public function __get($format) { if (in_array($format, TimeHelper::$formats)) { return TimeHelper::to_string($format, $this->time); } if (in_array($format, DateHelper::$formats)) { return DateHelper::to_string($format, $this->time); } }