src/phpGPX/Parsers/BoundsParser.php
public static function toXML(Bounds $bounds, \DOMDocument &$document)
	{
		$node =  $document->createElement(self::$tagName);

		if (!is_null($bounds->minLatitude)) {
			$node->setAttribute('minlat', $bounds->minLatitude);
		}

		if (!is_null($bounds->minLongitude)) {
			$node->setAttribute('minlon', $bounds->minLongitude);
		}

		if (!is_null($bounds->maxLatitude)) {
			$node->setAttribute('maxlat', $bounds->maxLatitude);
		}

		if (!is_null($bounds->maxLongitude)) {
			$node->setAttribute('maxlon', $bounds->maxLongitude);
		}

		return $node;
	}
public static function toXML(Bounds $bounds, \DOMDocument &$document)
	{
		$node =  $document->createElement(self::$tagName);

		if (!is_null($bounds->minLatitude)) {
			$node->setAttribute('minlat', $bounds->minLatitude);
		}

		if (!is_null($bounds->minLongitude)) {
			$node->setAttribute('minlon', $bounds->minLongitude);
		}

		if (!is_null($bounds->maxLatitude)) {
			$node->setAttribute('maxlat', $bounds->maxLatitude);
		}

		if (!is_null($bounds->maxLongitude)) {
			$node->setAttribute('maxlon', $bounds->maxLongitude);
		}

		return $node;
	}
public static function toXML ( Bounds $ bounds , \ DOMDocument & $ document ) { $ node = $ document -> createElement ( self :: $ tagName ) ; if ( ! is_null ( $ bounds -> minLatitude ) ) { $ node -> setAttribute ( 'minlat' , $ bounds -> minLatitude ) ; } if ( ! is_null ( $ bounds -> minLongitude ) ) { $ node -> setAttribute ( 'minlon' , $ bounds -> minLongitude ) ; } if ( ! is_null ( $ bounds -> maxLatitude ) ) { $ node -> setAttribute ( 'maxlat' , $ bounds -> maxLatitude ) ; } if ( ! is_null ( $ bounds -> maxLongitude ) ) { $ node -> setAttribute ( 'maxlon' , $ bounds -> maxLongitude ) ; } return $ node ; }
Create XML representation.
@param Bounds $bounds
@param \DOMDocument $document
@return \DOMElement
Create XML representation .