Heystack\Core\Processor\HandlerTrait
Provides standard processor handling functionality.
Stores an array of processors and provides methods for setting, getting
and adding processors to the array. Forces traiting class to implement abstract methods.
- Author: Cam Spiers <cameron@heyday.co.nz>
Synopsis
trait HandlerTrait
{
- // members
- private array $processors = ;
- // methods
- public mixed getProcessor()
- public boolean hasProcessor()
- public array getProcessors()
- public void setProcessors()
Hierarchy
Used by
Members
private
- $processors
—
array
Stores processors by an identifier key
Methods
public
- getProcessor() — Return a processor by an identifier if it exists
- getProcessors() — Return all processors
- hasProcessor() — Check if a processor is on the array
- setProcessors() — Set processors explicitly. This method uses the addProcessor method which should enforce what type of objects can be added to the array