Gatekeeper
class Gatekeeper
Gatekeeper.
Constants
LOGIN_BANNED |
Status code for banned users. |
LOGIN_ACTIVATING |
Status code for users who need to activate their account. |
LOGIN_INCORRECT |
Status code for users who fail to provide the correct credentials. |
LOGIN_LOCKED |
Status code for users that are temporarily locked. |
Properties
protected string | $defaultAdapter | Default adapter name. | |
protected array | $adapters | Adapters. | |
protected array | $adapterFactories | Adapter factories. |
Methods
string
string
string
useAsDefaultAdapter(string $name)
Sets the defaut adapter name.
adapterFactory(string $name)
Creates an adapter instance using a factory.
adapter(string|null $name = null)
Returns an adapter instance.
mixed
__call(string $name, array $arguments)
Magic shortcut to the default adapter.
string
getName()
No description
void
setUserRepository(UserRepositoryInterface $userRepository)
No description
getUserRepository()
No description
void
setUser(UserEntityInterface $user)
No description
UserEntityInterface|null
getUser()
No description
bool
isGuest()
No description
bool
isLoggedIn()
No description
Details
at line 80
__construct(array|AdapterInterface $adapter)
Constructor.
at line 91
protected string
registerAdapterInstance(AdapterInterface $adapter)
Registers an adapter instance.
at line 105
protected string
registerAdapterFactory(string $name, Closure $factory)
Registers an adapter factory.
at line 118
protected string
registerAdapter(array|AdapterInterface $adapter)
Registers an adapter.
at line 136
Gatekeeper
extend(array|AdapterInterface $adapter)
Registers a new adapter.
at line 149
Gatekeeper
useAsDefaultAdapter(string $name)
Sets the defaut adapter name.
at line 162
protected AdapterInterface
adapterFactory(string $name)
Creates an adapter instance using a factory.
at line 175
AdapterInterface
adapter(string|null $name = null)
Returns an adapter instance.
at line 189
mixed
__call(string $name, array $arguments)
Magic shortcut to the default adapter.