class WildcardPermission implements Wildcard

Constants

WILDCARD_TOKEN

PART_DELIMITER

SUBPART_DELIMITER

Methods

__construct(Model $record)

Create a new wildcard permission matcher.

array
getIndex()

Get the wildcard permission index.

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 24
__construct(Model $record)

Create a new wildcard permission matcher.

Parameters

Model $record

at line 33
array getIndex()

Get the wildcard permission index.

Return Value

array

at line 57
protected array buildIndex(array $index, array $parts, string $permission)

Build the wildcard permission index.

Parameters

array $index
array $parts
string $permission

Return Value

array

at line 101
bool implies(string $permission, string $guardName, array $index)

Determine if the wildcard permission implies another permission.

Parameters

string $permission
string $guardName
array $index

Return Value

bool

at line 118
protected bool checkIndex(array $permission, array $index)

Check the permission against the wildcard index.

Parameters

array $permission
array $index

Return Value

bool