public function reverseTransform($stringPoint)
    {
        if (!$stringPoint) {
            return null;
        }

        if (null === $stringPoint) {
            throw new TransformationFailedException(sprintf(
                'An area with number "%s" does not exist!',
                $stringPoint
            ));
        }

        if (is_array($stringPoint)) {
            $stringPoint = $stringPoint['gpsCoordinate'];
        }

        $coordinates = explode(', ', $stringPoint);

        if (count($coordinates) !== 2) {
            throw new TransformationFailedException(sprintf(
                'The Coordinates should contain latitude and longitude!',
                $stringPoint
            ));
        }

        return new Point($coordinates[0], $coordinates[1]);
    }
public function reverseTransform($stringPoint)
    {
        if (!$stringPoint) {
            return null;
        }

        if (null === $stringPoint) {
            throw new TransformationFailedException(sprintf(
                'An area with number "%s" does not exist!',
                $stringPoint
            ));
        }

        if (is_array($stringPoint)) {
            $stringPoint = $stringPoint['gpsCoordinate'];
        }

        $coordinates = explode(', ', $stringPoint);

        if (count($coordinates) !== 2) {
            throw new TransformationFailedException(sprintf(
                'The Coordinates should contain latitude and longitude!',
                $stringPoint
            ));
        }

        return new Point($coordinates[0], $coordinates[1]);
    }
public function reverseTransform ( $ stringPoint ) { if ( ! $ stringPoint ) { return null ; } if ( null === $ stringPoint ) { throw new TransformationFailedException ( sprintf ( 'An area with number "%s" does not exist!' , $ stringPoint ) ) ; } if ( is_array ( $ stringPoint ) ) { $ stringPoint = $ stringPoint [ 'gpsCoordinate' ] ; } $ coordinates = explode ( ', ' , $ stringPoint ) ; if ( count ( $ coordinates ) !== 2 ) { throw new TransformationFailedException ( sprintf ( 'The Coordinates should contain latitude and longitude!' , $ stringPoint ) ) ; } return new Point ( $ coordinates [ 0 ] , $ coordinates [ 1 ] ) ; }
Transforms a string to an object.
@param mixed $stringPoint
@return null|string
Transforms a string to an object .