* $xor = new ezcWorkflowConditionXor ( array ( $condition , ... ) ) ; * * * @package Workflow * @version 1.1rc1 */ class ezcWorkflowConditionXor extends ezcWorkflowConditionBooleanSet { /** * @var string */ protected $concatenation = 'XOR'; /** * Evaluates this condition with $value and returns true if the condition holds and false otherwise. * * @param mixed $value * @return boolean true when the condition holds, false otherwise. * @ignore */ public function evaluate( $value ) { $result = false; foreach ( $this->conditions as $condition ) { if ( $condition->evaluate( $value ) ) { if ( $result ) { return false; } $result = true; } } return $result; } } ?>