You are here

public function GeoPHPWrapper::load in Geofield 8

Loads a geometry object given some parameters.

Parameters

mixed|null $data: The data to load.

string $type: The string type.

Return value

\Geometry|null The geometry object

Overrides GeoPHPInterface::load

File

src/GeoPHP/GeoPHPWrapper.php, line 20

Class

GeoPHPWrapper
Provides a geoPHP Wrapper class.

Namespace

Drupal\geofield\GeoPHP

Code

public function load($data = NULL, $type = NULL) {
  try {
    return call_user_func_array([
      '\\geoPHP',
      'load',
    ], func_get_args());
  } catch (\Exception $e) {
    return NULL;
  }
}