AbstractProvider
abstract class AbstractProvider
Traits
Properties
| static protected int | $nextContextNamespace | The next provider context namespace. |
from HasProviderContext |
| protected string|null | $contextNamespace | The unique context namespace for this provider instance. |
from HasProviderContext |
| protected array | $parameters | The custom parameters to be sent with the request. |
|
| protected bool | $stateless | Indicates if the session state should be utilized. |
|
| protected array | $additionalConfig | The provider's baseline configuration. |
Methods
Get a value from the provider context.
Set a value in the provider context.
Get or set a value in the provider context.
Set the baseline provider configuration.
Override provider configuration for the current request.
Get a value from the provider configuration.
Get an instance of the Guzzle HTTP client.
Set the Guzzle HTTP client instance.
Get the request instance.
Determine if the provider is operating with state.
Determine if the provider is operating as stateless.
Indicate that the provider should operate as stateless.
Get the string used for session state.
Set the custom parameters of the request.
Get the custom parameters of the request.
Details
in
HasProviderContext at line 30
protected mixed
getContext(string $key, mixed $default = null)
Get a value from the provider context.
in
HasProviderContext at line 38
protected mixed
setContext(string $key, mixed $value)
Set a value in the provider context.
in
HasProviderContext at line 46
protected mixed
getOrSetContext(string $key, mixed $value)
Get or set a value in the provider context.
in
HasProviderContext at line 54
protected void
forgetContext(string $key)
Forget a value from the provider context.
in
HasProviderContext at line 62
protected string
getContextKey(string $key)
Get the context key for the provider.
at line 44
__construct(Request $request, array $guzzle = [])
Create a new provider instance.
at line 57
AbstractProvider
withConfig(array $config)
Set the baseline provider configuration.
On a worker-cached provider, the configuration persists and affects every subsequent request. Use setConfig() for per-request overrides.
at line 73
AbstractProvider
setConfig(array $config)
Override provider configuration for the current request.
The override is isolated to the current coroutine and must be applied independently on the redirect and callback requests.
at line 85
protected mixed
getConfig(string|null $key = null, mixed $default = null)
Get a value from the provider configuration.
Reads per-request context first, falls back to baseline instance property.
at line 95
protected Client
getHttpClient()
Get an instance of the Guzzle HTTP client.
at line 116
AbstractProvider
setHttpClient(Client $client)
Set the Guzzle HTTP client instance.
at line 131
AbstractProvider
setRequest(Request $request)
Set the request instance.
Stores the request in coroutine context so cached providers read the current request without leaking it to concurrent coroutines.
at line 141
protected Request
getRequest()
Get the request instance.
at line 157
protected bool
usesState()
Determine if the provider is operating with state.
at line 165
protected bool
isStateless()
Determine if the provider is operating as stateless.
at line 175
AbstractProvider
stateless()
Indicate that the provider should operate as stateless.
at line 185
protected string
getState()
Get the string used for session state.
at line 195
AbstractProvider
with(array $parameters)
Set the custom parameters of the request.
at line 205
protected array
getParameters()
Get the custom parameters of the request.