Esempio n. 1
0
 public function beforeSave($insert)
 {
     if (parent::beforeSave($insert)) {
         $this->created_at = time();
         return true;
     } else {
         return false;
     }
 }
 protected function setUp()
 {
     static::$params = (require __DIR__ . '/data/config.php');
     parent::setUp();
     BaseRecord::$db = $this->getConnection();
 }
Esempio n. 3
0
 public function afterSave($insert, $changedAttributes)
 {
     DynamicActiveRecordTest::$afterSaveInsert = $insert;
     DynamicActiveRecordTest::$afterSaveNewRecord = $this->isNewRecord;
     parent::afterSave($insert, $changedAttributes);
 }