public function addError($message = "") { $this->result = self::RESULT_ERROR; $this->errorMessages[] = $message; return $this; }