public function insert() { if (null === $this->time_recorded) { $this->time_recorded = standard_date('DATE_ISO8601', time()); } parent::insert(); }
public function insert() { /** * If the hash doesn't exist create it */ if (true === empty($this->hash)) { $this->hash = md5(uniqid(rand(), true)); } $this->created = standard_date('DATE_ISO8601', time()); parent::insert(); }