PHP Class SAuth_Adapter_Abstract, sauth

Mostrar archivo Open project: nnixaa/sauth

Protected Properties

Property Type Description
$_sessionLiveTime Session live time
$_sessionStorage Session storage

Public Methods

Method Description
__construct ( array $config ) Object constructor method
getConfig ( string $key = null ) : array Getting configuration
getSessionKey ( ) : string Getting session key
getSessionLiveTime ( ) : integer Gettion session live time
getSessionStorage ( ) : Zend_Session_Namespace Getting session storage
httpRequest ( string $type, string $url, string $parameters, $headers = [] ) : Zend_Http_Response Send http request
parseResponseJson ( string $body ) : array | false Parse json response
parseResponseUrl ( string $url ) : array | false Parse response url
setConfig ( array $config ) : array Setting configuration
setUpSessionStorage ( ) : Zend_Session_Namespace Setting up session storage

Protected Methods

Method Description
_getTokenRequest ( ) : false | string Getting token request from session storage
_prepareIdentity ( $identity ) : array Add specified parameters into identity
_setSessionKey ( string $key ) : false | string Setting session key After setSession key you must reset session storage calling setUpSessionStorage
_setSessionLiveTime ( integer $time ) : false | integer Settion session live time
_setTokenRequest ( string $tokenRequest ) : string Setting token request from session storage
_unsetTokenRequest ( ) Unset token request from session storage

Method Details

__construct() public method

Object constructor method
public __construct ( array $config )
$config array

_getTokenRequest() protected method

Getting token request from session storage
protected _getTokenRequest ( ) : false | string
return false | string

_prepareIdentity() protected method

Add specified parameters into identity
protected _prepareIdentity ( $identity ) : array
return array

_setSessionKey() protected method

Setting session key After setSession key you must reset session storage calling setUpSessionStorage
protected _setSessionKey ( string $key ) : false | string
$key string
return false | string

_setSessionLiveTime() protected method

Settion session live time
protected _setSessionLiveTime ( integer $time ) : false | integer
$time integer
return false | integer

_setTokenRequest() protected method

Setting token request from session storage
protected _setTokenRequest ( string $tokenRequest ) : string
$tokenRequest string
return string

_unsetTokenRequest() protected method

Unset token request from session storage
protected _unsetTokenRequest ( )

getConfig() public method

Getting configuration
public getConfig ( string $key = null ) : array
$key string
return array Configuration array

getSessionKey() public method

Getting session key
public getSessionKey ( ) : string
return string

getSessionLiveTime() public method

Gettion session live time
public getSessionLiveTime ( ) : integer
return integer

getSessionStorage() public method

Getting session storage
public getSessionStorage ( ) : Zend_Session_Namespace
return Zend_Session_Namespace

httpRequest() public method

Send http request
public httpRequest ( string $type, string $url, string $parameters, $headers = [] ) : Zend_Http_Response
$type string GET or POST
$url string
$parameters string
return Zend_Http_Response

parseResponseJson() public method

Parse json response
public parseResponseJson ( string $body ) : array | false
$body string
return array | false

parseResponseUrl() public method

Parse response url
public parseResponseUrl ( string $url ) : array | false
$url string
return array | false

setConfig() public method

Setting configuration
public setConfig ( array $config ) : array
$config array
return array Configuration array

setUpSessionStorage() public method

Setting up session storage
public setUpSessionStorage ( ) : Zend_Session_Namespace
return Zend_Session_Namespace

Property Details

$_sessionLiveTime protected_oe property

Session live time
protected $_sessionLiveTime

$_sessionStorage protected_oe property

Session storage
protected $_sessionStorage