Exemple #1
0
 /**
  * Add a deleted object to the ChangeSet.
  * @param OSM_Objects_Object $obj
  * @throws OSM_Exception
  */
 public function deleteObject(OSM_Objects_Object $obj)
 {
     $objectId = $obj->getId();
     if (empty($objectId)) {
         throw new OSM_Exception('Object Id must be set');
     }
     $obj->setAttribute('changeset', $this->_id);
     // do not increment the version, it's need by the server to detect conflict.
     //$obj->setAttribute('version', $obj->getAttribute('version') + 1);
     $this->_deleteObjects[$objectId] = $obj;
 }
Exemple #2
0
 public function __construct($id = null, $lat = null, $lon = null, array $tags = null)
 {
     parent::__construct($id);
     if ($lat != null) {
         $this->setLat($lat);
     }
     if ($lon != null) {
         $this->setLon($lon);
     }
     if (is_array($tags)) {
         $node->addTags($tags);
     }
     $this->setDirty();
 }
Exemple #3
0
 public function isDirty()
 {
     if (parent::isDirty()) {
         return true;
     }
     foreach ($this->_members as $m) {
         if ($m->isDirty()) {
             return true;
         }
     }
     return false;
 }