PHP Class PayPal\Cache\AuthorizationCache

Afficher le fichier Open project: paypal/rest-api-sdk-php Class Usage Examples

Méthodes publiques

Свойство Type Description
$CACHE_PATH

Méthodes publiques

Méthode 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

Méthode 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 méthode

Returns the cache file path
public static cachePath ( $config ) : string
$config
Résultat string

isEnabled() public static méthode

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

pull() public static méthode

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
Résultat mixed | null

push() public static méthode

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