Bristol SU Support Package
Public Member Functions | Protected Attributes | List of all members
BristolSU\Support\Action\ActionManager Class Reference
Inheritance diagram for BristolSU\Support\Action\ActionManager:
Inheritance graph
[legend]
Collaboration diagram for BristolSU\Support\Action\ActionManager:
Collaboration graph
[legend]

Public Member Functions

 registerAction (string $class, string $name, string $description)
 
 all ()
 
 fromClass (string $class)
 

Protected Attributes

 $actions = []
 

Detailed Description

Action Manager.

Holds actions when registered

Definition at line 12 of file ActionManager.php.

Member Function Documentation

◆ all()

BristolSU\Support\Action\ActionManager::all ( )

Return all registered actions.

Returns
array

Implements BristolSU\Support\Action\Contracts\ActionManager.

Definition at line 50 of file ActionManager.php.

References BristolSU\Support\Action\ActionManager\$actions.

◆ fromClass()

BristolSU\Support\Action\ActionManager::fromClass ( string  $class)

Return an action registered with the given class.

Parameters
string$classClass of the action
Exceptions

Implements BristolSU\Support\Action\Contracts\ActionManager.

Definition at line 63 of file ActionManager.php.

◆ registerAction()

BristolSU\Support\Action\ActionManager::registerAction ( string  $class,
string  $name,
string  $description 
)

Register a new action

Parameters
string$classClass name of the action.
string$nameA name for the action.
string$descriptionA description of the action.
Returns
void

Implements BristolSU\Support\Action\Contracts\ActionManager.

Definition at line 36 of file ActionManager.php.

Member Data Documentation

◆ $actions

BristolSU\Support\Action\ActionManager::$actions = []
protected

Definition at line 25 of file ActionManager.php.

Referenced by BristolSU\Support\Action\ActionManager\all().


The documentation for this class was generated from the following file: