Exemple #1
0
 public function save($con = null)
 {
     try {
         $con = Propel::getConnection();
         $con->begin();
         if (!$this->getId()) {
             $this->setId(Document::getGenericDocument($this)->getId());
         }
         parent::save($con);
         $con->commit();
         Document::cacheObj($this, get_class($this));
         return true;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
Exemple #2
0
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new RootfolderPeer();
     }
     return self::$peer;
 }