code = (int) $code; $this->identity = $identity; $this->messages = $messages; } /** * Returns whether the result represents a successful authentication attempt * * @return bool */ public function isValid() { return ($this->code > 0) ? true : false; } /** * getCode() - Get the result code for this authentication attempt * * @return int */ public function getCode() { return $this->code; } /** * Returns the identity used in the authentication attempt * * @return mixed */ public function getIdentity() { return $this->identity; } /** * Returns an array of string reasons why the authentication attempt was unsuccessful * * If authentication was successful, this method returns an empty array. * * @return array */ public function getMessages() { return $this->messages; } }