Пример #1
0
 public static function fromXmlObj(SimpleXMLElement $xmlObj)
 {
     $node = new OSM_Objects_Node();
     $processedElements = $node->_fromXmlObj($xmlObj);
     if (!array_key_exists('lat', $node->_attrs)) {
         throw new OSM_Exception(__CLASS__ . ' should have a "lat" attribute');
     }
     if (!array_key_exists('lon', $node->_attrs)) {
         throw new OSM_Exception(__CLASS__ . ' should have a "lon" attribute');
     }
     $node->setDirty(false);
     return $node;
 }