Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWorkflowNodeArithmeticBase

Workflow::ezcWorkflowNodeArithmeticBase

Class ezcWorkflowNodeArithmeticBase

Base class for nodes that implement simple integer arithmetic.

This class takes care of the configuration and setting and getting of data. The data to manipulate is put into the $variable member. The manipulating parameter is put into the member $value.

Implementors must implement the method doExecute() and put the result of the computation in $value member variable.

Source for this file: /Workflow/src/interfaces/node_arithmetic_base.php

ezcWorkflowNode
   |
   --ezcWorkflowNodeArithmeticBase
Version:   //autogen//

Descendants

Child Class Description
ezcWorkflowNodeVariableMul Multiplies a workflow variable with another variable or a constant value.
ezcWorkflowNodeVariableAdd Adds a workflow variable together with another variable or a constant value.
ezcWorkflowNodeVariableIncrement This node increments a workflow variable by one when executed..
ezcWorkflowNodeVariableDiv Divides a workflow variable by another variable or a constant value.
ezcWorkflowNodeVariableDecrement This node decrements a workflow variable by one when executed.
ezcWorkflowNodeVariableSub Subtracts a workflow variable from another variable or a constant value.

Inherited Constants

From ezcWorkflowNode:
ezcWorkflowNode::WAITING_FOR_ACTIVATION    The node is waiting to be activated.
ezcWorkflowNode::WAITING_FOR_EXECUTION    The node is activated and waiting to be executed.

Member Variables

protected mixed $operand = null
Contains the operand (if any).
protected mixed $variable
Contains the data to manipulate.

Inherited Member Variables

From ezcWorkflowNode
protected ezcWorkflowNode::$activatedFrom
protected ezcWorkflowNode::$activationState
protected ezcWorkflowNode::$configuration
protected ezcWorkflowNode::$id
protected ezcWorkflowNode::$inNodes
protected ezcWorkflowNode::$internalCall
protected ezcWorkflowNode::$maxInNodes
protected ezcWorkflowNode::$maxOutNodes
protected ezcWorkflowNode::$minInNodes
protected ezcWorkflowNode::$minOutNodes
protected ezcWorkflowNode::$numInNodes
protected ezcWorkflowNode::$numOutNodes
protected ezcWorkflowNode::$outNodes
protected ezcWorkflowNode::$state
protected ezcWorkflowNode::$threadId

Method Summary

public ezcWorkflowNodeArithmeticBase __construct( $configuration )
Constructs a new action node with the configuration $configuration.
protected abstract void doExecute( )
Implementors should perform the variable computation in this method.

Inherited Methods

From ezcWorkflowNode
public ezcWorkflowNode ezcWorkflowNode::__construct()
Constructs a new node with the configuration $configuration.
public void ezcWorkflowNode::accept()
Reimplementation of accept() calls accept on all out nodes.
protected void ezcWorkflowNode::activateNode()
Convenience method for activating an (outgoing) node.
public ezcWorkflowNode ezcWorkflowNode::addInNode()
Adds a node to the incoming nodes of this node.
public ezcWorkflowNode ezcWorkflowNode::addOutNode()
Adds a node to the outgoing nodes of this node.
public mixed ezcWorkflowNode::getConfiguration()
Returns the configuration of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getInNodes()
Returns the incoming nodes of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getOutNodes()
Returns the outgoing nodes of this node.
public boolean ezcWorkflowNode::removeInNode()
Removes a node from the incoming nodes of this node.
public boolean ezcWorkflowNode::removeOutNode()
Removes a node from the outgoing nodes of this node.
public void ezcWorkflowNode::verify()
Checks this node's constraints.

Methods

__construct

ezcWorkflowNodeArithmeticBase __construct( mixed $configuration )

Constructs a new action node with the configuration $configuration.

Configuration format

  • String: The name of the workflow variable to operate on.
  • Array:
    • name: The name of the workflow variable to operate on.
    • operand: Name of workflow variable or a numerical value. Not used by implementations without an operand.
Parameters:
Name Type Description
$configuration mixed
Exceptions:
Type Description
ezcWorkflowDefinitionStorageException
Redefinition of:
Method Description
ezcWorkflowNode::__construct() Constructs a new node with the configuration $configuration.

doExecute

void doExecute( )

Implementors should perform the variable computation in this method.

doExecute() is called automatically by execute().

Redefined in descendants as:
Method Description
ezcWorkflowNodeVariableMul::doExecute() Perform variable modification. 
ezcWorkflowNodeVariableAdd::doExecute() Perform variable modification. 
ezcWorkflowNodeVariableIncrement::doExecute() Perform variable modification. 
ezcWorkflowNodeVariableDiv::doExecute() Perform variable modification. 
ezcWorkflowNodeVariableDecrement::doExecute() Perform variable modification. 
ezcWorkflowNodeVariableSub::doExecute() Perform variable modification. 
Documentation generated by phpDocumentor 1.4.3