Location\Ellipsoid::createFromArray PHP Method

createFromArray() public static method

public static createFromArray ( $config ) : Ellipsoid
$config
return Ellipsoid
    public static function createFromArray($config)
    {
        return new static($config['name'], $config['a'], $config['f']);
    }

Usage Example

Example #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $ellipsoidConfig = array('name' => 'WGS-84', 'a' => 6378137.0, 'f' => 298.257223563);
     $this->ellipsoid = Ellipsoid::createFromArray($ellipsoidConfig);
     $this->calculator = new Haversine();
 }
All Usage Examples Of Location\Ellipsoid::createFromArray