Bristol SU Support Package
Public Member Functions | Private Attributes | List of all members
BristolSU\Support\Action\ActionDispatcher Class Reference

Public Member Functions

 __construct (ActionBuilderContract $builder)
 
 handle (TriggerableEvent $event)
 

Private Attributes

 $builder
 

Detailed Description

Dispatches actions when TriggerableEvents are fired

Definition at line 14 of file ActionDispatcher.php.

Constructor & Destructor Documentation

◆ __construct()

BristolSU\Support\Action\ActionDispatcher::__construct ( ActionBuilderContract  $builder)

Initialise the Action Dispatcher

Parameters
ActionBuilderContract$builder

Definition at line 29 of file ActionDispatcher.php.

References BristolSU\Support\Action\ActionDispatcher\$builder.

Member Function Documentation

◆ handle()

BristolSU\Support\Action\ActionDispatcher::handle ( TriggerableEvent  $event)

Dispatch any actions.

Finds all action instances in the database, builds each one and dispatches them

Parameters
TriggerableEvent$eventEvent that has been fired.

Definition at line 41 of file ActionDispatcher.php.

References BristolSU\Support\Action\Contracts\TriggerableEvent\getFields().

Member Data Documentation

◆ $builder

BristolSU\Support\Action\ActionDispatcher::$builder
private

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