src/Coordinate/Ellipsoid.php
public static function createFromName($name = self::WGS84)
    {
        $name = trim($name);

        if (empty($name)) {
            throw new InvalidArgumentException('Please provide an ellipsoid name !');
        }

        if (!array_key_exists($name, self::$referenceEllipsoids)) {
            throw new InvalidArgumentException(
                sprintf('%s ellipsoid does not exist in selected reference ellipsoids !', $name)
            );
        }

        return self::createFromArray(self::$referenceEllipsoids[$name]);
    }
public static function createFromName($name = self::WGS84)
    {
        $name = trim($name);

        if (empty($name)) {
            throw new InvalidArgumentException('Please provide an ellipsoid name !');
        }

        if (!array_key_exists($name, self::$referenceEllipsoids)) {
            throw new InvalidArgumentException(
                sprintf('%s ellipsoid does not exist in selected reference ellipsoids !', $name)
            );
        }

        return self::createFromArray(self::$referenceEllipsoids[$name]);
    }
public static function createFromName ( $ name = self :: WGS84 ) { $ name = trim ( $ name ) ; if ( empty ( $ name ) ) { throw new InvalidArgumentException ( 'Please provide an ellipsoid name !' ) ; } if ( ! array_key_exists ( $ name , self :: $ referenceEllipsoids ) ) { throw new InvalidArgumentException ( sprintf ( '%s ellipsoid does not exist in selected reference ellipsoids !' , $ name ) ) ; } return self :: createFromArray ( self :: $ referenceEllipsoids [ $ name ] ) ; }
Create the ellipsoid chosen by its name.

@param string $name The name of the ellipsoid to create (optional).

@return Ellipsoid
Create the ellipsoid chosen by its name .