public function save() { $this->modified = time(); if (!$this->getId()) { $this->created = $this->modified; } parent::save(); }