* $workflow = new ezcWorkflow( 'IncrementingLoop' ); * * $set = new ezcWorkflowNodeVariableSet( array( 'i' => 1 ) ); * $step = new ezcWorkflowNodeVariableIncrement( 'i' ); * $break = new ezcWorkflowConditionVariable( 'i', new ezcWorkflowConditionIsEqual( 10 ) ); * $continue = new ezcWorkflowConditionVariable( 'i', new ezcWorkflowConditionIsLessThan( 10 ) ); * * $workflow->startNode->addOutNode( $set ); * * $loop = new ezcWorkflowNodeLoop; * $loop->addInNode( $set ); * $loop->addInNode( $step ); * * $loop->addConditionalOutNode( $continue, $step ); * $loop->addConditionalOutNode( $break, $workflow->endNode ); * * * @package Workflow * @version 1.1rc1 */ class ezcWorkflowNodeLoop extends ezcWorkflowNodeConditionalBranch { /** * Constraint: The minimum number of incoming nodes this node has to have * to be valid. Set to false to disable this constraint. * * @var integer */ protected $minInNodes = 2; /** * Constraint: The maximum number of incoming nodes this node has to have * to be valid. Set to false to disable this constraint. * * @var integer */ protected $maxInNodes = 2; /** * Constraint: The minimum number of outgoing nodes this node has to have * to be valid. Set to false to disable this constraint. * * @var integer */ protected $minOutNodes = 2; /** * Constraint: The maximum number of outgoing nodes this node has to have * to be valid. Set to false to disable this constraint. * * @var integer */ protected $maxOutNodes = 2; } ?>