src/Coordinate/Coordinate.php
public function setFromString($coordinates)
    {
        if (!is_string($coordinates)) {
            throw new InvalidArgumentException('The given coordinates should be a string !');
        }

        try {
            $inDecimalDegree = $this->toDecimalDegrees($coordinates);
            $this->setLatitude($inDecimalDegree[0]);
            $this->setLongitude($inDecimalDegree[1]);
        } catch (InvalidArgumentException $e) {
            throw $e;
        }
    }
public function setFromString($coordinates)
    {
        if (!is_string($coordinates)) {
            throw new InvalidArgumentException('The given coordinates should be a string !');
        }

        try {
            $inDecimalDegree = $this->toDecimalDegrees($coordinates);
            $this->setLatitude($inDecimalDegree[0]);
            $this->setLongitude($inDecimalDegree[1]);
        } catch (InvalidArgumentException $e) {
            throw $e;
        }
    }
public function setFromString ( $ coordinates ) { if ( ! is_string ( $ coordinates ) ) { throw new InvalidArgumentException ( 'The given coordinates should be a string !' ) ; } try { $ inDecimalDegree = $ this -> toDecimalDegrees ( $ coordinates ) ; $ this -> setLatitude ( $ inDecimalDegree [ 0 ] ) ; $ this -> setLongitude ( $ inDecimalDegree [ 1 ] ) ; } catch ( InvalidArgumentException $ e ) { throw $ e ; } }
Creates a valid and acceptable geographic coordinates.

@param string $coordinates

@throws InvalidArgumentException
Creates a valid and acceptable geographic coordinates .