Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Result Class Reference

Public Member Functions

 __construct ($code, $identity, array $messages=[])
 Sets the result code, identity, and failure messages.
 
 isValid ()
 Returns whether the result represents a successful authentication attempt.
 
 getCode ()
 getCode() - Get the result code for this authentication attempt
 
 getIdentity ()
 Returns the identity used in the authentication attempt.
 
 getMessages ()
 Returns an array of string reasons why the authentication attempt was unsuccessful.
 

Public Attributes

const FAILURE = 0
 General Failure.
 
const FAILURE_IDENTITY_NOT_FOUND = -1
 Failure due to identity not being found.
 
const FAILURE_IDENTITY_AMBIGUOUS = -2
 Failure due to identity being ambiguous.
 
const FAILURE_CREDENTIAL_INVALID = -3
 Failure due to invalid credential being supplied.
 
const FAILURE_UNCATEGORIZED = -4
 Failure due to uncategorized reasons.
 
const SUCCESS = 1
 Authentication success.
 

Protected Attributes

 $code
 
 $identity
 
 $messages
 

Constructor & Destructor Documentation

__construct (   $code,
  $identity,
array  $messages = [] 
)

Sets the result code, identity, and failure messages.

Parameters
int$code
mixed$identity
array$messages

Member Function Documentation

getCode ( )

getCode() - Get the result code for this authentication attempt

Returns
int
getIdentity ( )

Returns the identity used in the authentication attempt.

Returns
mixed
getMessages ( )

Returns an array of string reasons why the authentication attempt was unsuccessful.

If authentication was successful, this method returns an empty array.

Returns
array
isValid ( )

Returns whether the result represents a successful authentication attempt.

Returns
bool

Member Data Documentation

$code
protected
$identity
protected
$messages
protected
const FAILURE = 0

General Failure.

const FAILURE_CREDENTIAL_INVALID = -3

Failure due to invalid credential being supplied.

const FAILURE_IDENTITY_AMBIGUOUS = -2

Failure due to identity being ambiguous.

const FAILURE_IDENTITY_NOT_FOUND = -1

Failure due to identity not being found.

const FAILURE_UNCATEGORIZED = -4

Failure due to uncategorized reasons.

const SUCCESS = 1

Authentication success.