class PasswordBrokerManager implements PasswordBrokerFactory mixin PasswordBroker

Constants

DEFAULT_BROKER_CONTEXT_KEY

The coroutine context key holding the per-request default broker override.

Properties

protected array $brokers

The array of created "drivers".

Methods

__construct(Container $app)

Create a new PasswordBroker manager instance.

broker(string|null $name = null)

Attempt to get the broker from the local cache.

resolve(string $name)

Resolve the given broker.

createTokenRepository(array $config)

Create a token repository instance based on the given configuration.

array|null
getConfig(string $name)

Get the password broker configuration.

string|null
resolveBrokerNameForGuard(string $guard)

Resolve the password broker name declared by the given guard.

string
getDefaultDriver()

Get the default password broker name.

void
setDefaultDriver(string $name)

Set the default password broker name.

mixed
__call(string $method, array $parameters)

Dynamically call the default driver instance.

Details

at line 32
__construct(Container $app)

Create a new PasswordBroker manager instance.

Parameters

Container $app

at line 40
PasswordBroker broker(string|null $name = null)

Attempt to get the broker from the local cache.

Parameters

string|null $name

Return Value

PasswordBroker

at line 52
protected PasswordBroker resolve(string $name)

Resolve the given broker.

Parameters

string $name

Return Value

PasswordBroker

Exceptions

InvalidArgumentException

at line 75
protected TokenRepositoryInterface createTokenRepository(array $config)

Create a token repository instance based on the given configuration.

Parameters

array $config

Return Value

TokenRepositoryInterface

at line 107
protected array|null getConfig(string $name)

Get the password broker configuration.

Parameters

string $name

Return Value

array|null

at line 117
string|null resolveBrokerNameForGuard(string $guard)

Resolve the password broker name declared by the given guard.

Parameters

string $guard

Return Value

string|null

Exceptions

InvalidArgumentException

at line 139
string getDefaultDriver()

Get the default password broker name.

Resolves the coroutine-scoped override first, then the broker declared by the current default guard's "passwords" key.

Return Value

string

Exceptions

InvalidArgumentException

at line 161
void setDefaultDriver(string $name)

Set the default password broker name.

Uses coroutine Context so one request's override doesn't affect others.

Parameters

string $name

Return Value

void

at line 169
mixed __call(string $method, array $parameters)

Dynamically call the default driver instance.

Parameters

string $method
array $parameters

Return Value

mixed