예제 #1
0
 /**
  * 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
 /**
  * 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);
 }