src/phpGPX/Parsers/BoundsParser.php
public static function parse(\SimpleXMLElement $node)
	{
		if ($node->getName() != self::$tagName) {
			return null;
		}

		$bounds = new Bounds();

		$bounds->minLatitude = isset($node['minlat']) ? (float) $node['minlat'] : null;
		$bounds->minLongitude = isset($node['minlon']) ? (float) $node['minlon'] : null;
		$bounds->maxLatitude = isset($node['maxlat']) ? (float) $node['maxlat'] : null;
		$bounds->maxLongitude = isset($node['maxlon']) ? (float) $node['maxlon'] : null;

		return $bounds;
	}
public static function parse(\SimpleXMLElement $node)
	{
		if ($node->getName() != self::$tagName) {
			return null;
		}

		$bounds = new Bounds();

		$bounds->minLatitude = isset($node['minlat']) ? (float) $node['minlat'] : null;
		$bounds->minLongitude = isset($node['minlon']) ? (float) $node['minlon'] : null;
		$bounds->maxLatitude = isset($node['maxlat']) ? (float) $node['maxlat'] : null;
		$bounds->maxLongitude = isset($node['maxlon']) ? (float) $node['maxlon'] : null;

		return $bounds;
	}
public static function parse ( \ SimpleXMLElement $ node ) { if ( $ node -> getName ( ) != self :: $ tagName ) { return null ; } $ bounds = new Bounds ( ) ; $ bounds -> minLatitude = isset ( $ node [ 'minlat' ] ) ? ( float ) $ node [ 'minlat' ] : null ; $ bounds -> minLongitude = isset ( $ node [ 'minlon' ] ) ? ( float ) $ node [ 'minlon' ] : null ; $ bounds -> maxLatitude = isset ( $ node [ 'maxlat' ] ) ? ( float ) $ node [ 'maxlat' ] : null ; $ bounds -> maxLongitude = isset ( $ node [ 'maxlon' ] ) ? ( float ) $ node [ 'maxlon' ] : null ; return $ bounds ; }
Parse data from XML.
@param \SimpleXMLElement $node
@return Bounds|null
Parse data from XML .