コード例 #1
0
ファイル: DateCreated.php プロジェクト: JurJean/waf-model
 /**
  * Convert $value to the current dateTime, but only if it is NULL
  *
  * @param null|Zend_Date $value
  * @return string
  */
 public function toStorage($state)
 {
     $value = $state[$this->getPropertyName()];
     if (null === $value) {
         $state[$this->getPropertyName()] = Zend_Date::now();
     }
     return parent::toStorage($state);
 }
コード例 #2
0
ファイル: DateModified.php プロジェクト: JurJean/waf-model
 /**
  * Regenerates the current dateTime
  *
  * @param null|Zend_Date $value
  * @return string
  */
 public function toStorage($state)
 {
     $state[$this->getPropertyName()] = Zend_Date::now();
     return parent::toStorage($state);
 }