Workflow
[ ]
[ ]
[ ]
[ ]
[ ]
Source for file or.php
Documentation is available at or.php
1. <?php
2. /**
3. * File containing the ezcWorkflowConditionOr class.
4. *
5. * @package Workflow
6. * @version 1.2
7. * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
8. * @license http://ez.no/licenses/new_bsd New BSD License
9. */
10.
11. /**
12. * Boolean OR.
13. *
14. * An object of the ezcWorkflowConditionOr class represents a boolean OR expression. It can
15. * hold an arbitrary number of ezcWorkflowCondition objects.
16. *
17. * <code>
18. * <?php
19. * $or = new ezcWorkflowConditionOr( array ( $condition , ... ) );
20. * ?>
21. * </code>
22. *
23. * @package Workflow
24. * @version 1.2
25. */
26. class ezcWorkflowConditionOr extends ezcWorkflowConditionBooleanSet
27. {
28. /**
29. * @var string
30. */
31. protected $concatenation = '||';
32.
33. /**
34. * Evaluates this condition with $value and returns true if the condition holds and false otherwise.
35. *
36. * @param mixed $value
37. * @return boolean true when the condition holds, false otherwise.
38. * @ignore
39. */
40. public function evaluate( $value )
41. {
42. foreach ( $this->conditions as $condition )
43. {
44. if ( $condition->evaluate( $value ) )
45. {
46. return true;
47. }
48. }
49.
50. return false;
51. }
52. }
53. ?>
Last updated: Wed, 18 Jun 2008