Heystack\Core\Input\GroupedProcessor
Allows a group/array processors to be run from a single identifier
Enables the ability to trigger multiple intput processors from one request
- Author: Cam Spiers <cameron@heyday.co.nz>
Synopsis
class GroupedProcessor
implements
ProcessorInterface
{
- // members
- private $identifier;
- // methods
- public void __construct()
- public void addProcessor()
- public Identifier getIdentifier()
- public array process()
- // Inherited methods from HandlerTrait
- public mixed getProcessor()
- public boolean hasProcessor()
- public array getProcessors()
- public void setProcessors()
Hierarchy
Members
private
- $identifier
—
string
Identifier of the grouped processor
Methods
public
- __construct() — Runs when the object is instantiated and sees the processors and identifier
- addProcessor() — Adds an input processor to the array of processors, storing it by its identifier
- getIdentifier() — Returns the identifier of this processor
- process() — Runs over the list of processors running them all in turn
Inherited from Heystack\Core\Processor\HandlerTrait
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