Path

ez components / documentation / api reference / 2008.1 / workflow


Workflow

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

Source for file is_false.php

Documentation is available at is_false.php

 1. <?php
 2. /**
 3.  * File containing the ezcWorkflowConditionIsFalse 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.  * Workflow condition that evaluates to true if the provided input is false.
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 ezcWorkflowConditionIsFalse
22.  * );
23.  * ?>
24.  * </code>
25.  *
26.  * @package Workflow
27.  * @version 1.2
28.  */
29. class ezcWorkflowConditionIsFalse implements ezcWorkflowCondition
30. {
31.     /**
32.      * Evaluates this condition with $value and returns true if it is false and false if it is not.
33.      *
34.      * @param  mixed $value 
35.      * @return boolean true when the condition holds, false otherwise.
36.      * @ignore
37.      */
38.     public function evaluate$value )
39.     {
40.         return $value === false;
41.     }
42.  
43.     /**
44.      * Returns a textual representation of this condition.
45.      *
46.      * @return string 
47.      * @ignore
48.      */
49.     public function __toString()
50.     {
51.         return 'is false';
52.     }
53. }
54. ?>
Last updated: Wed, 18 Jun 2008