Exemplo n.º 1
0
 /**
  * Save the entity.
  *
  * Writes the entity and the corresponding metadata and attributes to the 
  * database, increasing the revisionid by one.
  * 
  * @return bool True on success and false on error.
  * @todo Handle errors from save.
  * @todo Handle entity with out metadata and/or attributes.
  */
 public function saveEntity()
 {
     assert('$this->_entity instanceof Sspmod_Janus_Entity');
     $old_revisionid = $this->_entity->getRevisionid();
     $this->_entity->save($this->_metadata);
     $new_revisionid = $this->_entity->getRevisionid();
     if ($old_revisionid !== $new_revisionid) {
         $this->_modified = true;
     }
     $this->_saveBlockedEntities($new_revisionid);
     $this->_saveAllowedEntities($new_revisionid);
     $this->_saveDisableConsent($new_revisionid);
     return true;
 }