GrantFactory
in package
Represents a factory used when retrieving an authorization grant type.
Table of Contents
Properties
- $registry : array<string|int, mixed>
Methods
- checkGrant() : void
- Checks if a variable is a valid grant.
- getGrant() : AbstractGrant
- Returns a grant singleton by name.
- isGrant() : bool
- Determines if a variable is a valid grant.
- setGrant() : self
- Defines a grant singleton in the registry.
- registerDefaultGrant() : self
- Registers a default grant singleton by name.
Properties
$registry
protected
array<string|int, mixed>
$registry
= []
Methods
checkGrant()
Checks if a variable is a valid grant.
public
checkGrant(mixed $class) : void
Parameters
- $class : mixed
Tags
getGrant()
Returns a grant singleton by name.
public
getGrant(string $name) : AbstractGrant
If the grant has not be registered, a default grant will be loaded.
Parameters
- $name : string
Return values
AbstractGrantisGrant()
Determines if a variable is a valid grant.
public
isGrant(mixed $class) : bool
Parameters
- $class : mixed
Return values
boolsetGrant()
Defines a grant singleton in the registry.
public
setGrant(string $name, AbstractGrant $grant) : self
Parameters
- $name : string
- $grant : AbstractGrant
Return values
selfregisterDefaultGrant()
Registers a default grant singleton by name.
protected
registerDefaultGrant(string $name) : self
Parameters
- $name : string