ActionKey Class Reference
Detailed Description
An action key is a combination of a resource, context and action that is represented as a string.
ActionKey is a helper class for handling action keys.
Definition at line 22 of file ActionKey.php.
Static Public Member Functions | |
static | createKey ($resource, $context, $action) |
static | parseKey ($actionKey) |
static | getBestMatch (ActionKeyProvider $actionKeyProvider, $resource, $context, $action) |
Member Function Documentation
◆ createKey()
|
static |
Create an action key from the given values.
- Parameters
-
$resource The resource $context The context $action The action
- Returns
- String
Definition at line 33 of file ActionKey.php.
◆ parseKey()
|
static |
Parse an action.
- Parameters
-
$actionKey The action key
- Returns
- Associative array with keys 'resouce', 'context', 'action'
Definition at line 42 of file ActionKey.php.
◆ getBestMatch()
|
static |
Get an action key that matches a given combination of resource, context, action best.
- Parameters
-
$actionKeyProvider ActionKeyProvider instance used to search action keys $resource The given resource $context The given context $action The given action
- Returns
- The best matching key or an empty string if nothing matches.
Definition at line 55 of file ActionKey.php.