| [ Index ] |
PHP Cross Reference of Web Application Component Toolkit |
[Summary view] [Print] [Text view]
1 <?php 2 //-------------------------------------------------------------------------------- 3 // Copyright 2003 Procata, Inc. 4 // Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html) 5 //-------------------------------------------------------------------------------- 6 /** 7 * @package WACT_TAG 8 * @version $Id: outputexpression.inc.php,v 1.3 2004/06/15 15:51:51 jeffmoore Exp $ 9 */ 10 //-------------------------------------------------------------------------------- 11 /** 12 * Outputs the resultof an expression 13 * @see CoreOutputTag 14 * @see http://wact.sourceforge.net/index.php/CoreOutputTag 15 * @access protected 16 * @package WACT_TAG 17 */ 18 class OutputExpression extends CompilerComponent { 19 /** 20 * @var Expression 21 * @access private 22 */ 23 var $expression; 24 25 /** 26 */ 27 function OutputExpression($expression) { 28 $this->expression =& new Expression($expression, $this, 'html'); 29 } 30 31 function prepare() { 32 $this->expression->prepare(); 33 parent::prepare(); 34 } 35 36 /** 37 * @param CodeWriter 38 * @return void 39 * @access protected 40 */ 41 function generate(&$code) { 42 if ($this->expression->isConstant()) { 43 $code->writeHTML($this->expression->getValue()); 44 } else { 45 $this->expression->generatePreStatement($code); 46 $code->writePHP('echo '); 47 $this->expression->generateExpression($code); 48 $code->writePHP(';'); 49 $this->expression->generatePostStatement($code); 50 } 51 } 52 53 } 54 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sun Nov 28 19:36:09 2004 | Cross-referenced by PHPXref 0.5 |