WildcardPermission
class WildcardPermission implements Wildcard
Constants
| WILDCARD_TOKEN |
|
| PART_DELIMITER |
|
| SUBPART_DELIMITER |
|
Methods
array
getIndex()
Get the wildcard permission index.
array
getDeniedIndex()
Get the wildcard index of the record's denied permissions.
array
indexPermissions(Collection $permissions)
Build a wildcard index of the given permissions, keyed by guard.
array
buildIndex(array $index, array $parts, string $permission)
Build the wildcard permission index.
bool
implies(string $permission, string $guardName, array $index)
Determine if the wildcard permission implies another permission.
bool
checkIndex(array $permission, array $index)
Check the permission against the wildcard index.
Details
at line 23
__construct(Model $record)
Create a new wildcard permission matcher.
at line 32
array
getIndex()
Get the wildcard permission index.
at line 43
array
getDeniedIndex()
Get the wildcard index of the record's denied permissions.
at line 54
protected array
indexPermissions(Collection $permissions)
Build a wildcard index of the given permissions, keyed by guard.
at line 76
protected array
buildIndex(array $index, array $parts, string $permission)
Build the wildcard permission index.
at line 110
bool
implies(string $permission, string $guardName, array $index)
Determine if the wildcard permission implies another permission.
at line 127
protected bool
checkIndex(array $permission, array $index)
Check the permission against the wildcard index.