예제 #1
0
파일: Time.php 프로젝트: cawaphp/html
 /**
  * {@inheritdoc}
  */
 public function setValue($value) : parent
 {
     if ($value instanceof TimeObject) {
         $value = $value->format();
     } elseif (is_string($value) && $value) {
         $date = new TimeObject($value);
         $value = $date->format();
     }
     return parent::setValue($value);
 }
예제 #2
0
파일: DateTime.php 프로젝트: cawaphp/cawa
 /**
  * @param Time $time
  *
  * @return $this|self
  */
 public function setTimeFromTime(Time $time)
 {
     return $this->setTimeFromTimeString($time->format());
 }