Property | Type | Description | |
---|---|---|---|
$permissions | array | The permissions. | |
$preparedPermissions | array | An array of cached, prepared permissions. | |
$secondaryPermissions | array | The secondary permissions. |
Method | Description | |
---|---|---|
__construct ( array $permissions = null, array $secondaryPermissions = null ) : void | Create a new permissions instance. | |
getSecondaryPermissions ( ) : array | Returns the secondary permissions. | |
hasAccess ( $permissions ) | {@inheritDoc} | |
hasAnyAccess ( $permissions ) | {@inheritDoc} | |
setSecondaryPermissions ( array $secondaryPermissions ) : void | Sets secondary permissions. |
Method | Description | |
---|---|---|
checkPermission ( array $prepared, string $permission ) : boolean | Checks a permission in the prepared array, including wildcard checks and permissions. | |
createPreparedPermissions ( ) : void | Returns the prepared permissions. | |
extractClassPermissions ( string $key ) : array | Takes the given permission key and inspects it for a class & method. If it exists, methods may be comma-separated, e.g. Class@method1,method2. | |
getPreparedPermissions ( ) : array | Lazily grab the prepared permissions. | |
preparePermissions ( array &$prepared, array $permissions ) : void | Does the heavy lifting of preparing permissions. |
abstract protected createPreparedPermissions ( ) : void | ||
return | void |
protected extractClassPermissions ( string $key ) : array | ||
$key | string | |
return | array |
protected getPreparedPermissions ( ) : array | ||
return | array |
public getSecondaryPermissions ( ) : array | ||
return | array |
public setSecondaryPermissions ( array $secondaryPermissions ) : void | ||
$secondaryPermissions | array | |
return | void |
protected array $preparedPermissions | ||
return | array |
protected array $secondaryPermissions | ||
return | array |