[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/framework/template/compiler/ -> textnode.inc.php (source)

   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_TEMPLATE
   8  * @version $Id: textnode.inc.php,v 1.12 2004/11/12 21:25:06 jeffmoore Exp $
   9  */
  10  //--------------------------------------------------------------------------------
  11  /**
  12  * Make sure CompilerDirectiveTag is included
  13  */
  14  require_once WACT_ROOT . 'template/compiler/compilerdirective.inc.php';
  15  /**
  16  * Used to write literal text from the source template to the compiled
  17  * template
  18  * @see http://wact.sourceforge.net/index.php/TextNode
  19  * @access public
  20  * @package WACT_TEMPLATE
  21  */
  22  class TextNode extends CompilerDirectiveTag {
  23      /**
  24      * A text string to write
  25      * @var string
  26      * @access private
  27      */
  28      var $contents;
  29  
  30      /**
  31      * Constructs TextNode
  32      * @param string contents of the text node
  33      * @access protected
  34      */
  35  	function TextNode($text) {
  36          $this->contents = $text;
  37      }
  38  
  39      /**
  40      * Appends a further string to the text node
  41      * @param string
  42      * @return void
  43      * @access protected
  44      */
  45  	function append($text) {
  46          $this->contents .= $text;
  47      }
  48  
  49      /**
  50      * Writes the contents of the text node to the compiled template
  51      * using the writeHTML method
  52      * @param CodeWriter
  53      * @return void
  54      * @access protected
  55      */
  56  	function generate(&$code) {
  57          $code->writeHTML($this->contents);
  58      }
  59  }
  60  
  61  ?>


Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5