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

Authentication Adapter authenticates using callback function. More...

Public Member Functions

 __construct ($callback=null)
 
 authenticate ()
 Authenticate using the provided callback.
 
 getCallback ()
 Gets the value of callback.
 
 setCallback ($callback)
 Sets the value of callback.
 
- Public Member Functions inherited from AbstractAdapter
 getCredential ()
 Returns the credential of the account being authenticated, or NULL if none is set.
 
 setCredential ($credential)
 Sets the credential for binding.
 
 getIdentity ()
 Returns the identity of the account being authenticated, or NULL if none is set.
 
 setIdentity ($identity)
 Sets the identity for binding.
 

Protected Attributes

 $callback
 
- Protected Attributes inherited from AbstractAdapter
 $credential
 
 $identity
 

Detailed Description

Authentication Adapter authenticates using callback function.

The Callback function must return an identity on authentication success, and false on authentication failure.

Constructor & Destructor Documentation

__construct (   $callback = null)
Parameters
callable$callbackThe authentication callback

Member Function Documentation

authenticate ( )

Authenticate using the provided callback.

Returns
Result The authentication result
Exceptions
RuntimeException

Implements AdapterInterface.

getCallback ( )

Gets the value of callback.

Returns
null|callable
setCallback (   $callback)

Sets the value of callback.

Parameters
callable$callbackthe callback
Exceptions
InvalidArgumentException

Member Data Documentation

$callback
protected