コード例 #1
0
ファイル: BasesfErrorLog.php プロジェクト: sgrove/cothinker
 public function delete($con = null)
 {
     foreach (sfMixer::getCallables('BasesfErrorLog:delete:pre') as $callable) {
         $ret = call_user_func($callable, $this, $con);
         if ($ret) {
             return;
         }
     }
     if ($this->isDeleted()) {
         throw new PropelException("This object has already been deleted.");
     }
     if ($con === null) {
         $con = Propel::getConnection(sfErrorLogPeer::DATABASE_NAME);
     }
     try {
         $con->begin();
         sfErrorLogPeer::doDelete($this, $con);
         $this->setDeleted(true);
         $con->commit();
     } catch (PropelException $e) {
         $con->rollback();
         throw $e;
     }
     foreach (sfMixer::getCallables('BasesfErrorLog:delete:post') as $callable) {
         call_user_func($callable, $this, $con);
     }
 }