SdkState
in package
implements
ConfigurableContract
Uses
ConfigurableMixin
Interfaces, Classes, Traits and Enums
Table of Contents
- $accessToken : string|null
- $accessTokenExpiration : int|null
- $accessTokenScope : array<string|int, mixed>|null
- $idToken : string|null
- $refreshToken : string|null
- $user : array<string|int, mixed>|null
- $configuration : array<string|int, mixed>|null
- __construct() : mixed
- SdkState Constructor.
- getAccessToken() : string|null
- getAccessTokenExpiration() : int|null
- getAccessTokenScope() : array<string|int, string>|null
- getIdToken() : string|null
- getRefreshToken() : string|null
- getUser() : array<string|int, mixed>|null
- hasAccessToken() : bool
- hasAccessTokenExpiration() : bool
- hasAccessTokenScope() : bool
- hasIdToken() : bool
- hasRefreshToken() : bool
- hasUser() : bool
- pushAccessTokenScope() : array<string|int, string>|null
- setAccessToken() : self
- setAccessTokenExpiration() : self
- setAccessTokenScope() : self
- setIdToken() : self
- setRefreshToken() : self
- setUser() : self
- applyConfiguration() : self
- exceptionIfNull() : void
- filterArray() : array<string|int, string>|null
- filterArrayMixed() : array<string|int, mixed>|null
- filterDomain() : string|null
- filterHtml() : string
- filterString() : string
- filterStringTags() : string
- filterStringUtf8() : string
- getPropertyDefaults() : array<string|int, mixed>
- getPropertyValidators() : array<string|int, callable>
- validateProperties() : void
Properties
$accessToken
public
string|null
$accessToken
= null
$accessTokenExpiration
public
int|null
$accessTokenExpiration
= null
$accessTokenScope
public
array<string|int, mixed>|null
$accessTokenScope
= null
$idToken
public
string|null
$idToken
= null
$refreshToken
public
string|null
$refreshToken
= null
$user
public
array<string|int, mixed>|null
$user
= null
$configuration
private
array<string|int, mixed>|null
$configuration
= null
Methods
__construct()
SdkState Constructor.
public
__construct([array<string|int, mixed>|null $configuration = null ][, string|null $idToken = null ][, string|null $accessToken = null ][, array<string|int, string>|null $accessTokenScope = null ][, string|null $refreshToken = null ][, array<string|int, mixed>|null $user = null ][, int|null $accessTokenExpiration = null ]) : mixed
Parameters
- $configuration : array<string|int, mixed>|null = null
-
Optional. Pass an array of parameter keys and values to define the internal state of the SDK.
- $idToken : string|null = null
-
Optional. The id token currently in use for the session, if available.
- $accessToken : string|null = null
-
Optional. The access token currently in use for the session, if available.
- $accessTokenScope : array<string|int, string>|null = null
-
Optional. The scopes from the access token for the session, if available.
- $refreshToken : string|null = null
-
Optional. The refresh token currently in use for the session, if available.
- $user : array<string|int, mixed>|null = null
-
Optional. An array representing the user data, if available.
- $accessTokenExpiration : int|null = null
-
Optional. When the $accessToken is expected to expire, if available.
Return values
mixed —getAccessToken()
public
getAccessToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|null —getAccessTokenExpiration()
public
getAccessTokenExpiration([Throwable|null $exceptionIfNull = null ]) : int|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
int|null —getAccessTokenScope()
public
getAccessTokenScope([Throwable|null $exceptionIfNull = null ]) : array<string|int, string>|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
array<string|int, string>|null —getIdToken()
public
getIdToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|null —getRefreshToken()
public
getRefreshToken([Throwable|null $exceptionIfNull = null ]) : string|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
string|null —getUser()
public
getUser([Throwable|null $exceptionIfNull = null ]) : array<string|int, mixed>|null
Parameters
- $exceptionIfNull : Throwable|null = null
Return values
array<string|int, mixed>|null —$user an array representing user data
hasAccessToken()
public
hasAccessToken() : bool
Return values
bool —hasAccessTokenExpiration()
public
hasAccessTokenExpiration() : bool
Return values
bool —hasAccessTokenScope()
public
hasAccessTokenScope() : bool
Return values
bool —hasIdToken()
public
hasIdToken() : bool
Return values
bool —hasRefreshToken()
public
hasRefreshToken() : bool
Return values
bool —hasUser()
public
hasUser() : bool
Return values
bool —pushAccessTokenScope()
public
pushAccessTokenScope(array<string|int, string>|string $scopes) : array<string|int, string>|null
Parameters
- $scopes : array<string|int, string>|string
-
a string (or array of strings) representing the scopes to add for the access token
Return values
array<string|int, string>|null —setAccessToken()
public
setAccessToken([string|null $accessToken = null ]) : self
Parameters
- $accessToken : string|null = null
Return values
self —setAccessTokenExpiration()
public
setAccessTokenExpiration([int|null $accessTokenExpiration = null ]) : self
Parameters
- $accessTokenExpiration : int|null = null
Return values
self —setAccessTokenScope()
public
setAccessTokenScope(array<string|int, string>|null $accessTokenScope) : self
Parameters
- $accessTokenScope : array<string|int, string>|null
-
an array of strings representing the scopes for the access token
Return values
self —setIdToken()
public
setIdToken([string|null $idToken = null ]) : self
Parameters
- $idToken : string|null = null
Return values
self —setRefreshToken()
public
setRefreshToken([string|null $refreshToken = null ]) : self
Parameters
- $refreshToken : string|null = null
Return values
self —setUser()
public
setUser(array<string|int, mixed>|null $user) : self
Parameters
- $user : array<string|int, mixed>|null
-
an array representing user data
Return values
self —applyConfiguration()
private
applyConfiguration(array<string|int, mixed>|null $configuration) : self
Parameters
- $configuration : array<string|int, mixed>|null
Tags
Return values
self —exceptionIfNull()
private
exceptionIfNull(mixed $value[, Throwable|null $throwable = null ]) : void
Parameters
- $value : mixed
-
a value to compare against NULL
- $throwable : Throwable|null = null
-
Optional. A Throwable exception to raise if $value is NULL.
Return values
void —filterArray()
private
filterArray(array<string|int, string>|null $filtering[, bool $keepKeys = false ]) : array<string|int, string>|null
Parameters
- $filtering : array<string|int, string>|null
-
an array of strings to filter, or NULL
- $keepKeys : bool = false
-
Optional. Whether to keep array keys or reindex the array appropriately.
Return values
array<string|int, string>|null —filterArrayMixed()
private
filterArrayMixed(array<string|int, mixed>|null $filtering[, bool $keepKeys = false ]) : array<string|int, mixed>|null
Parameters
- $filtering : array<string|int, mixed>|null
-
an array to filter, or NULL
- $keepKeys : bool = false
-
Optional. Whether to keep array keys or reindex the array appropriately.
Return values
array<string|int, mixed>|null —filterDomain()
private
filterDomain(string $domain) : string|null
Parameters
- $domain : string
Return values
string|null —filterHtml()
private
filterHtml(string $str[, int $flags = ENT_QUOTES | ENT_SUBSTITUTE ]) : string
Parameters
- $str : string
- $flags : int = ENT_QUOTES | ENT_SUBSTITUTE
Return values
string —filterString()
private
filterString(string $str[, bool $allowLineBreaks = false ]) : string
Parameters
- $str : string
- $allowLineBreaks : bool = false
Return values
string —filterStringTags()
private
filterStringTags(string $str[, bool $allowLineBreaks = false ]) : string
Parameters
- $str : string
- $allowLineBreaks : bool = false
Return values
string —filterStringUtf8()
private
filterStringUtf8(string $str[, bool $strip = false ]) : string
Parameters
- $str : string
- $strip : bool = false
Return values
string —getPropertyDefaults()
private
getPropertyDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed> —getPropertyValidators()
private
getPropertyValidators() : array<string|int, callable>
Tags
Return values
array<string|int, callable> —validateProperties()
private
validateProperties() : void