PHP Класс PayPal\Cache\AuthorizationCache

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$CACHE_PATH

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

cachePath() публичный статический Метод

Returns the cache file path
public static cachePath ( $config ) : string
$config
Результат string

isEnabled() публичный статический Метод

Determines from the Configuration if caching is currently enabled/disabled
public static isEnabled ( $config ) : boolean
$config
Результат boolean

pull() публичный статический Метод

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
Результат mixed | null

push() публичный статический Метод

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

Описание свойств

$CACHE_PATH публичное статическое свойство

public static $CACHE_PATH