init()); } function save() { $this->setTimestamp(); try { parent::save(); return true; } catch (\Sudzy\ValidationException $e) { return false; } catch (\PDOException $e) { return false; } } private function setTimestamp() { if ($this->created_at === null) { $this->created_at = date("Y-m-d H:i:s"); } } }