self::SUCCESS ) { $code = 1; } $this->_code = $code; $this->_identity = $identity; $this->_messages = $messages; } /** * Returns whether the result represents a successful authentication attempt * * @return boolean */ 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; } }