Path

ez components / documentation / api reference / 2008.1 / workflow


Workflow

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Source for file is_equal_or_greater_than.php

Documentation is available at is_equal_or_greater_than.php

 1. <?php
 2. /**
 3.  * File containing the ezcWorkflowConditionIsEqualOrGreaterThan 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.  * Condition that evaluates to true if the provided value is greater than or equal to the reference value.
13.  *
14.  * Typically used together with ezcWorkflowConditionVariable to use the
15.  * condition on a workflow variable.
16.  *
17.  * <code>
18.  * <?php
19.  * $condition = new ezcWorkflowConditionVariable(
20.  *   'variable name',
21.  *   new ezcWorkflowConditionIsEqualOrGreatherThan( $comparisonValue )
22.  * );
23.  * ?>
24.  * </code>
25.  *
26.  * @package Workflow
27.  * @version 1.2
28.  */
29. class ezcWorkflowConditionIsEqualOrGreaterThan extends ezcWorkflowConditionComparison
30. {
31.     /**
32.      * @var mixed 
33.      */
34.     protected $operator = '>=';
35.  
36.     /**
37.      * Evaluates this condition with $value and returns true if $value is greather than
38.      * or equal to the reference value or false if not.
39.      *
40.      * @param  mixed $value 
41.      * @return boolean true when the condition holds, false otherwise.
42.      * @ignore
43.      */
44.     public function evaluate$value )
45.     {
46.         return $value >= $this->value;
47.     }
48. }
49. ?>
Last updated: Wed, 18 Jun 2008