PHP Class PayPal\Cache\AuthorizationCache

Mostrar archivo Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Properties

Property Type Description
$CACHE_PATH

Public Methods

Method Description
cachePath ( $config ) : string Returns the cache file path
isEnabled ( $config ) : boolean Determines from the Configuration if caching is currently enabled/disabled
pull ( array | null $config = null, string $clientId = null ) : mixed | null A pull method which would read the persisted data based on clientId.
push ( array | null $config = null, $clientId, $accessToken, $tokenCreateTime, $tokenExpiresIn ) Persists the data into a cache file provided in $CACHE_PATH

Private Methods

Method Description
getConfigValue ( $key, $config ) : null | string Returns the Value of the key if found in given config, or from PayPal Config Manager Returns null if not found

Method Details

cachePath() public static method

Returns the cache file path
public static cachePath ( $config ) : string
$config
return string

isEnabled() public static method

Determines from the Configuration if caching is currently enabled/disabled
public static isEnabled ( $config ) : boolean
$config
return boolean

pull() public static method

If clientId is not provided, an array with all the tokens would be passed.
public static pull ( array | null $config = null, string $clientId = null ) : mixed | null
$config array | null
$clientId string
return mixed | null

push() public static method

Persists the data into a cache file provided in $CACHE_PATH
public static push ( array | null $config = null, $clientId, $accessToken, $tokenCreateTime, $tokenExpiresIn )
$config array | null
$clientId
$accessToken
$tokenCreateTime
$tokenExpiresIn

Property Details

$CACHE_PATH public_oe static_oe property

public static $CACHE_PATH