PHP Class Alterway\Component\Workflow\Workflow

Show file Open project: alterway/component-workflow

Public Methods

Method Description
__construct ( Node $start, NodeMap $nodes, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
initialize ( string $token = null ) : Workflow Initializes the workflow with a given token.
next ( Alterway\Component\Workflow\ContextInterface $context ) : Workflow Moves the current token to the next node of the workflow.

Method Details

__construct() public method

public __construct ( Node $start, NodeMap $nodes, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$start Node
$nodes NodeMap
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

initialize() public method

Initializes the workflow with a given token.
public initialize ( string $token = null ) : Workflow
$token string
return Workflow

next() public method

Moves the current token to the next node of the workflow.
public next ( Alterway\Component\Workflow\ContextInterface $context ) : Workflow
$context Alterway\Component\Workflow\ContextInterface
return Workflow