/**
  * @return DBTransaction
  **/
 public function setDB(DB $db)
 {
     if ($this->isStarted()) {
         throw new WrongStateException('transaction already started, can not switch to another db');
     }
     return parent::setDB($db);
 }
Пример #2
0
 public function preSave(PropelPDO $con = null)
 {
     if ($this->creationdate === null) {
         $this->setCreationdate(time());
     }
     return parent::preSave($con);
 }
Пример #3
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
 public function __construct(DB $db)
 {
     parent::__construct($db);
     $this->queue = new Queue();
 }
Пример #5
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return TransactionPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new TransactionPeer();
     }
     return self::$peer;
 }