OAuthStorageAbstract
in package
implements
OAuthStorageInterface
AbstractYes
Implements an abstract OAuth storage adapter
Table of Contents
Interfaces
- OAuthStorageInterface
- Specifies the methods required for an OAuth token storage adapter
Properties
- $logger : LoggerInterface
- $options : OAuthOptions|SettingsContainerInterface
Methods
- __construct() : mixed
- OAuthStorageAbstract constructor.
- fromStorage() : AccessToken
- Retrieves token JOSN from the underlying storage engine and returns an AccessToken
- setLogger() : static
- Sets a logger. (LoggerAwareInterface is stupid)
- toStorage() : mixed
- Prepares an AccessToken for storage (serialize, encrypt etc.) and returns a value that is suited for the underlying storage engine
- construct() : void
- A replacement constructor that you can call in extended classes, so that you don't have to implement the monstrous original `__construct()`
- getServiceName() : string
- Gets the current service provider name
Properties
$logger
protected
LoggerInterface
$logger
= new NullLogger()
$options
protected
OAuthOptions|SettingsContainerInterface
$options
= new OAuthOptions()
Methods
__construct()
OAuthStorageAbstract constructor.
public
__construct([OAuthOptions|SettingsContainerInterface $options = new OAuthOptions() ][, LoggerInterface $logger = new NullLogger() ]) : mixed
Parameters
- $options : OAuthOptions|SettingsContainerInterface = new OAuthOptions()
- $logger : LoggerInterface = new NullLogger()
fromStorage()
Retrieves token JOSN from the underlying storage engine and returns an AccessToken
public
fromStorage(mixed $data) : AccessToken
Parameters
- $data : mixed
Tags
Return values
AccessTokensetLogger()
Sets a logger. (LoggerAwareInterface is stupid)
public
setLogger(LoggerInterface $logger) : static
Parameters
- $logger : LoggerInterface
Tags
Return values
statictoStorage()
Prepares an AccessToken for storage (serialize, encrypt etc.) and returns a value that is suited for the underlying storage engine
public
toStorage(AccessToken $token) : mixed
Parameters
- $token : AccessToken
Tags
construct()
A replacement constructor that you can call in extended classes, so that you don't have to implement the monstrous original `__construct()`
protected
construct() : void
getServiceName()
Gets the current service provider name
protected
getServiceName(string $service) : string
Parameters
- $service : string