[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/src/compiler/expression/node/ -> WactBinaryExpressionNode.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  /**

  11   * class WactBinaryExpressionNode.

  12   *

  13   * @package wact

  14   * @version $Id$

  15   */
  16  class WactBinaryExpressionNode extends WactTemplateExpressionNode
  17  {
  18    protected $first_operand;
  19    protected $second_operand;
  20    protected $operator;
  21  
  22    function __construct($first, $second, $operator)
  23    {
  24      $this->first_operand = $first;
  25      $this->second_operand = $second;
  26      $this->operator = $operator;
  27    }
  28  
  29    function generatePreStatement($code)
  30    {
  31      $this->first_operand->generatePreStatement($code);
  32      $this->second_operand->generatePreStatement($code);
  33    }
  34  
  35    function generateExpression($code)
  36    {
  37      $this->first_operand->generateExpression($code);
  38      $code->writePHP($this->operator);
  39      $this->second_operand->generateExpression($code);
  40    }
  41  
  42    function generatePostStatement($code)
  43    {
  44      $this->first_operand->generatePostStatement($code);
  45      $this->second_operand->generatePostStatement($code);
  46    }
  47  
  48    function prepare()
  49    {
  50      $this->first_operand->prepare();
  51      $this->second_operand->prepare();
  52    }
  53  }
  54  
  55  ?>


Generated: Thu Aug 28 04:51:15 2008 Cross-referenced by PHPXref 0.7