Exemplo n.º 1
0
 public function setWith($value, $checkType = true)
 {
     $phpDate = \dateTime::createFromFormat(self::mysqlDateTimeFormat, $value);
     if ($phpDate !== false) {
         parent::setWith($phpDate, $checkType);
     } else {
         parent::setWith($value, false);
         if ($checkType === true) {
             $this->fail(sprintf($this->getLocale()->_('%s is not in format Y-m-d H:i:s'), $this));
         }
     }
     return $this;
 }