* * * * @package Workflow * @version 1.3.1 */ class ezcWorkflowConditionInArray extends ezcWorkflowConditionComparison { /** * @var mixed */ protected $operator = 'in array'; /** * Evaluates this condition with $value and returns true if it is false or false if it is not. * * @param mixed $value * @return boolean true when the condition holds, false otherwise. * @ignore */ public function evaluate( $value ) { return in_array( $value, $this->value ); } /** * Returns a textual representation of this condition. * * @return string * @ignore */ public function __toString() { $array = $this->value; $count = count( $array ); for ( $i = 0; $i < $count; $i++ ) { $array[$i] = var_export( $array[$i], true ); } return $this->operator . '(' . join( ', ', $array ) . ')'; } } ?>