processed_at = current_time('mysql'); $this->set('status', self::STATUS_COMPLETED); $this->save(); return ($this->getErrors() === false && $this->id() > 0); } function save() { // set the default priority to medium if(!$this->priority) { $this->priority = self::PRIORITY_MEDIUM; } parent::save(); return $this; } }