_value; } /** * @param Carbon $value */ public function setDateTime($value) { $this->_value = $value; } function jsonSerialize() { return is_null($this->_value) ? null : $this->_value->__toString(); } public static function jsonDeserialize($json) { if (is_string($json)) { $value = LuStringUtils::parseDate($json); if (is_null($value)) { throw new LuDboDeserializeException("Invalid date time value"); } } else if (is_null($json)) { $value = null; } else { throw new LuDboDeserializeException("Invalid date time value"); } $val = new static(); $val->setDateTime($value); return $val; } public static function generateSample() { $date = Carbon::now(); return $date->__toString(); } }