_code = (int) $code; } /** * Get the result code for this authentication attempt. * * @return int */ public function getCode() { return $this->_code; } /** * Returns true if the authentication was sucessfull, false otherwise. * * @return bool */ public function isValid() { return $this->_code == self::SUCCESS; } }