HTML_Template_Flexy
[ class tree: HTML_Template_Flexy ] [ index: HTML_Template_Flexy ] [ all elements ]

Source for file If.php

Documentation is available at If.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2002 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors:  Alan Knowles <alan@akbkhome>                               |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: If.php 329605 2013-03-01 01:59:25Z alan_k $
  20. //
  21.  
  22. /**
  23. * Class to handle If statements
  24. *
  25. *
  26. */
  27. class HTML_Template_Flexy_Token_If extends HTML_Template_Flexy_Token
  28.     /**
  29.     * Condition for the if statement.
  30.     * @var string // a variable
  31.     * @access public
  32.     */
  33.     
  34.     var $condition;
  35.      /**
  36.     * if the statement is negative = eg. !somevar..
  37.     * @var string 
  38.     * @access public
  39.     */
  40.     
  41.     
  42.     var $isNegative '';
  43.     
  44.     /**
  45.     * Setvalue - a string
  46.     * @see parent::setValue()
  47.     */
  48.     function setValue($value{
  49.         //var_dump($value);
  50.         if (strlen($value&& $value{0== '!'{
  51.             $this->isNegative '!';
  52.             $value substr($value,1);
  53.         }
  54.         $this->condition=$value;
  55.     }
  56.     
  57.     function toString()
  58.     {
  59.         return '';
  60.     }
  61. }

Documentation generated on Mon, 11 Mar 2019 15:59:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.