Path

ez components / documentation / api reference / 2008.1 / workflow


Workflow

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

Source for file is_equal_or_less_than.php

Documentation is available at is_equal_or_less_than.php

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