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

Source for file Token.php

Documentation is available at Token.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: Token.php,v 1.50 2005/01/25 04:39:06 alan_k Exp $
  20. //
  21. //  This is the master Token file for The New Token driver Engine.
  22. //  All the Token output, and building routines are in here.
  23. //
  24. //  Note overriden methods are not documented unless they differ majorly from
  25. //  The parent.
  26. //
  27. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['base'= 0; 
  28. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['state'= 0;
  29. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['statevars'= array();
  30. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['activeForm''';
  31. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['tokens'= array();
  32. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['gettextStrings'= array();
  33. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['activeFormId'= 0;
  34. $GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['flexyIgnore'= false;
  35. /**
  36. * Base Class for all Tokens.
  37. *
  38. @abstract Provides the static Create Method, and default toString() methods
  39. *
  40. */
  41.  
  42. class HTML_Template_Flexy_Token {
  43.     
  44.     /**
  45.     * the token type (Depreciated when we have classes for all tokens
  46.     *
  47.     * @var string 
  48.     * @access public
  49.     */
  50.     var $token;
  51.     /**
  52.     * the default value (normally a string)
  53.     *
  54.     * @var string 
  55.     * @access public
  56.     */
  57.     var $value;
  58.     /**
  59.     * the line the token is from
  60.     *
  61.     * @var int 
  62.     * @access public
  63.     */
  64.     var $line;
  65.     /**
  66.     * the character Position
  67.     *
  68.     * @var int 
  69.     * @access public
  70.     */
  71.     var $charPos;
  72.     
  73.  
  74.     /**
  75.     * factory a Token
  76.     *
  77.     * Standard factory method.. - with object vars.
  78.     * ?? rename me to factory?
  79.     * @param   string      Token type
  80.     * @param   mixed       Initialization settings for token
  81.     * @param   int   line that the token is defined.
  82.     * 
  83.     *
  84.     * @return   object    Created Object
  85.     * @access   public
  86.     */
  87.   
  88.     function factory($token,$value,$line,$charPos=0{
  89.         // try not to reload the same class to often
  90.         static $loaded = array();
  91.         
  92.         
  93.         $c 'HTML_Template_Flexy_Token_'.$token;
  94.         
  95.         if (!class_exists($c&& !isset($loaded[$token])) {
  96.             // make sure parse errors are picked up - no  @ here..
  97.             if (file_exists(dirname(__FILE__)."/Token/{$token}.php")) {
  98.                 require_once 'HTML/Template/Flexy/Token/'.$token.'.php';
  99.             }
  100.             $loaded[$token= true;
  101.         
  102.             
  103.         $t = new HTML_Template_Flexy_Token;
  104.         
  105.         if (class_exists($c)) {
  106.             $t = new $c;
  107.         }
  108.         $t->token = $token;
  109.         $t->charPos = $charPos;
  110.         
  111.         if ($t->setValue($value=== false{
  112.             // kick back error conditions..
  113.             return false;
  114.         }
  115.         $t->line = $line;
  116.         
  117.         return $t;
  118.     }
  119.     
  120.     /**
  121.     * Standard Value iterpretor
  122.     *
  123.     * @param   mixed    value recieved from factory method
  124.  
  125.     * @return   none 
  126.     * @access   public
  127.     */
  128.   
  129.     function setValue($value{
  130.         $this->value = $value;
  131.     }
  132.  
  133.     
  134.     /**
  135.     * compile to String (vistor method) replaces toString
  136.     *
  137.     * @return   string   HTML
  138.     * @access   public
  139.     */
  140.     
  141.     function compile(&$compiler{
  142.         return $compiler->toString($this);
  143.     }
  144.     
  145.      
  146.     /**
  147.     * compile children (visitor approach).
  148.     *
  149.     * @return   string   HTML
  150.     * @access   public
  151.     */
  152.     function compileChildren&$compiler{
  153.          
  154.         if (!$this->children{
  155.             return '';
  156.         }
  157.         if ($this->ignoreChildren{
  158.             return;
  159.         }
  160.         $ret '';
  161.         //echo "output $this->id";
  162.         //new Gtk_VarDump($this);
  163.         foreach ($this->children as $child{
  164.             if (!$child{
  165.                 continue;
  166.             }
  167.             $add $child->compile($compiler);
  168.             if (is_a($add,'PEAR_Error')) {
  169.                 return $add;
  170.             }
  171.             $ret .= $add;
  172.         }
  173.         return $ret;
  174.     }
  175.     
  176.     
  177.  
  178.     
  179.     /* ======================================================= */
  180.     /* Token Managmenet = parse and store all the tokens in 
  181.      * an associative array and tree.
  182.      */
  183.    
  184.     /**
  185.     * Run a Tokenizer and Store its results
  186.     * It should build a DOM Tree of the HTML
  187.     * 
  188.     * @param   object    Tokenizer to run.. - Theoretically other Tokenizers could be done for email,rtf etc.
  189.     *
  190.     * @access   public
  191.     * @return   base token (really a dummy token, which contains the tree)
  192.     * @static
  193.     */
  194.   
  195.     function buildTokens($tokenizer
  196.     {
  197.     
  198.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  199.         
  200.         // first record is a filler - to stick all the children on !
  201.         // reset my globals..
  202.         $_HTML_TEMPLATE_FLEXY_TOKEN['base'= 0;
  203.         
  204.         $_HTML_TEMPLATE_FLEXY_TOKEN['statevars'= array();
  205.         $_HTML_TEMPLATE_FLEXY_TOKEN['state'= 0;
  206.         
  207.         $_HTML_TEMPLATE_FLEXY_TOKEN['flexyIgnore'= false;
  208.         if (@$GLOBALS['_HTML_TEMPLATE_FLEXY']['currentOptions']['flexyIgnore']{
  209.             $_HTML_TEMPLATE_FLEXY_TOKEN['flexyIgnore'= true;
  210.         }
  211.         $_HTML_TEMPLATE_FLEXY_TOKEN['activeFormId'= 0;
  212.         $_HTML_TEMPLATE_FLEXY_TOKEN['activeForm''';
  213.         
  214.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'= array(new HTML_Template_Flexy_Token);
  215.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][0]->id =0;
  216.         $_HTML_TEMPLATE_FLEXY_TOKEN['gettextStrings'= array();
  217.         $i=1;
  218.         
  219.         
  220.         // initialize state - this trys to make sure that
  221.         // you dont do to many elses etc.
  222.        
  223.         //echo "RUNNING TOKENIZER";
  224.         // step one just tokenize it.
  225.         while ($t $tokenizer->yylex()) {  
  226.             
  227.             if ($t == HTML_TEMPLATE_FLEXY_TOKEN_ERROR{
  228.                 //echo "ERROR";
  229.                 
  230.                 //print_r($tokenizer);
  231.                 $err "<PRE>" $tokenizer->error . "\n" .
  232.                     htmlspecialchars(substr($tokenizer->yy_buffer,0,$tokenizer->yy_buffer_end)) 
  233.                     "<font color='red'>"htmlspecialchars(substr($tokenizer->yy_buffer,$tokenizer->yy_buffer_end,100)) 
  234.                     ".......</font></PRE>";
  235.                     
  236.                 return HTML_Template_Flexy::raiseError('HTML_Template_Flexy::Syntax error in ".
  237.                     "Template line:'$tokenizer->yyline .
  238.                     $err
  239.                    HTML_TEMPLATE_FLEXY_ERROR_SYNTAX ,HTML_TEMPLATE_FLEXY_ERROR_RETURN);
  240.             }
  241.             if ($t == HTML_TEMPLATE_FLEXY_TOKEN_NONE{
  242.                 continue;
  243.             }
  244.             if $tokenizer->value->token == 'Php' {
  245.                 if (!$GLOBALS['_HTML_TEMPLATE_FLEXY']['currentOptions']['allowPHP']{
  246.                     return HTML_Template_Flexy::raiseError('PHP code found in script (Token)',
  247.                         HTML_TEMPLATE_FLEXY_ERROR_SYNTAX,HTML_TEMPLATE_FLEXY_ERROR_RETURN
  248.                     );
  249.                 }
  250.                 
  251.                 if ($GLOBALS['_HTML_TEMPLATE_FLEXY']['currentOptions']['allowPHP'=== 'delete'{
  252.                     continue;
  253.                 }
  254.             
  255.             }
  256.             $i++;
  257.             $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i$tokenizer->value;
  258.             $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->id = $i;
  259.             
  260.             // this whole children thing needs rethinking 
  261.             // - I think the body of the page should be wrapped: ..
  262.             //  ?php if (!$this->bodyOnly) { .. <HTML> .... <BODY....>  ?php } ?
  263.             // 
  264.             // old values alias to new ones..
  265.             if (isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXYSTART'])) {
  266.                 unset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXYSTART']);
  267.                 $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXY:START'= true;
  268.             }
  269.             
  270.             if (isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXYSTARTCHILDREN'])) {
  271.                 unset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXYSTARTCHILDREN']);
  272.                 $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXY:STARTCHILDREN'= true;
  273.             }
  274.             
  275.             if (isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXY:START'])) {
  276.                 $_HTML_TEMPLATE_FLEXY_TOKEN['base'$i;
  277.                 unset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXY:START']);
  278.             }
  279.             
  280.             if (isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->ucAttributes['FLEXY:STARTCHILDREN'])) {
  281.                 $_HTML_TEMPLATE_FLEXY_TOKEN['base'$i;
  282.             }
  283.             
  284.             
  285.             //print_r($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]);
  286.              
  287.         }
  288.         //echo "BUILT TOKENS";
  289.         
  290.         $res &$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'];
  291.        
  292.         // DEBUG DUMPTING : foreach($res as $k) {  $k->dump(); }
  293.         
  294.         
  295.         $stack = array();
  296.         $total $i +1;
  297.         
  298.         // merge strings and entities - blanking out empty text.
  299.         
  300.   
  301.         for($i=1;$i<$total;$i++{
  302.             if (!isset($res[$i]|| !is_a($res[$i],'HTML_Template_Flexy_Token_Text')) {
  303.                 continue;
  304.             }
  305.             $first $i;
  306.             $i++;
  307.             while ($i<$total && is_a($res[$i],'HTML_Template_Flexy_Token_Text')) {
  308.                 if (isset($res[$i])) {
  309.                     $res[$first]->value .= $res[$i]->value;
  310.                     $res[$i]->value = '';
  311.                 }
  312.                 $i++;
  313.             }
  314.         }  
  315.         // connect open  and close tags.
  316.         
  317.         // this is done by having a stack for each of the tag types..
  318.         // then removing it when it finds the closing one
  319.         // eg.
  320.         //  <a href=""><img src=""></a>
  321.         //  ends up with a stack for <a>'s and a stack for <img>'s
  322.         //
  323.         //
  324.         //
  325.         //echo '<PRE>' . htmlspecialchars(print_R($res,true));//exit;
  326.        
  327.         for($i=1;$i<$total;$i++{
  328.             //echo "Checking TAG $i\n";
  329.             if (empty($res[$i]->tag)) {
  330.                 continue;
  331.             }
  332.             if ($res[$i]->tag{0== '/'// it's a close tag..
  333.                 //echo "GOT END TAG: {$res[$i]->tag}\n";
  334.                 $tag strtoupper(substr($res[$i]->tag,1));
  335.                 if (!count($stack)) {
  336.                     continue;
  337.                 }
  338.                 $ssc count($stack- 1;
  339.                 /* go up the stack trying to find a match */
  340.                 for($s $ssc$s > -1; $s--{
  341.                     if (!isset($stack[$s])) {
  342.                         echo "MISSED STACK? $s<BR><PRE>";print_r($stack);exit;
  343.                     }
  344.                     if (!isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$stack[$s]])) {
  345.                         echo "STACKED BAD OFFSET : {$stack[$s]}<BR><PRE>";print_r($stack);exit;
  346.                     }
  347.                     $tok =  &$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$stack[$s]];
  348.                     if (strtoupper($tok->tag== $tag{
  349.                         // got the matching closer..
  350.                         // echo "MATCH: {$i}:{$tok->tag}({$tok->line}) to  {$stack[$s]}:$tag<BR>";
  351.                         $tok->close = &$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i];
  352.                         
  353.                         array_splice($stack,$s);
  354.                         //print_R($stack);
  355.                          
  356.                         break;
  357.                     }
  358.                 }
  359.                 continue;
  360.             }
  361.             $stack[$i;
  362.             // tag with no closer (or unmatched in stack..)
  363.         
  364.       
  365.                 
  366.         // create a dummy close for the end
  367.         $i $total;
  368.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i= new HTML_Template_Flexy_Token;
  369.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->id = $total;
  370.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][0]->close = &$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$total];
  371.         
  372.         // now is it possible to connect children...
  373.         // now we need to GLOBALIZE!! - 
  374.         
  375.         
  376.         $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'$res;
  377.         
  378.         HTML_Template_Flexy_Token::buildChildren(0);
  379.         //new Gtk_VarDump($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][0]);
  380.         //echo '<PRE>';print_R($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$_HTML_TEMPLATE_FLEXY_TOKEN['base']]  ); 
  381.         return $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$_HTML_TEMPLATE_FLEXY_TOKEN['base']];
  382.     }
  383.     /**
  384.     * Matching closing tag for a Token
  385.     *
  386.     * @var object|none optional closing tag
  387.     * @access public
  388.     */
  389.     
  390.   
  391.     var $close;
  392.            
  393.     /**
  394.     * array of children to each object.
  395.     *
  396.     * @var array 
  397.     * @access public|private
  398.     */
  399.     
  400.   
  401.     var $children = array();
  402.     
  403.     /**
  404.     * Build the child array for each element.
  405.     * RECURSIVE FUNCTION!!!!
  406.     * @param   int  id of node to add children to.
  407.     *
  408.     * @access   public
  409.     * @static
  410.     */
  411.     function buildChildren($id
  412.     {
  413.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  414.         
  415.         $base &$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$id];
  416.         $base->children = array();
  417.         $start $base->id +1;
  418.         $end $base->close->id;
  419.         
  420.         for ($i=$start$i<$end$i++{
  421.             //echo "{$base->id}:{$base->tag} ADDING {$i}{$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->tag}<BR>";
  422.             //if ($base->id == 1176) {
  423.             //    echo "<PRE>";print_r($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]);
  424.             // }
  425.          
  426.             $base->children[&$_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i];
  427.             
  428.             if (isset($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]&& 
  429.                 is_object($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->close)) {
  430.             
  431.                 // if the close id is greater than my id - ignore it! - 
  432.                 if ($_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->close->id > $end{
  433.                     continue;
  434.                 }
  435.                 HTML_Template_Flexy_Token::buildChildren($i);
  436.                 $i $_HTML_TEMPLATE_FLEXY_TOKEN['tokens'][$i]->close->id;
  437.             }
  438.         }
  439.     }
  440.             
  441.             
  442.             
  443.     /**
  444.     * Flag to ignore children - Used to block output for select/text area etc.
  445.     * may not be required as I moved the Tag parsing into the toString ph
  446.     *
  447.     * @var boolean ingore children
  448.     * @access public
  449.     */
  450.     
  451.   
  452.     var $ignoreChildren = false;
  453.     
  454.     
  455.     
  456.      
  457.     /* ======================================================== */
  458.     /* variable STATE management 
  459.     *
  460.     * raw variables are assumed to be $this->, unless defined by foreach..
  461.     * it also monitors syntax - eg. end without an if/foreach etc.
  462.     */
  463.  
  464.     
  465.     /**
  466.     * tell the generator you are entering a block
  467.     *
  468.     * @access   public
  469.     */
  470.     function pushState(
  471.     {
  472.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  473.         
  474.         $_HTML_TEMPLATE_FLEXY_TOKEN['state']++;
  475.         $s $_HTML_TEMPLATE_FLEXY_TOKEN['state'];
  476.         
  477.         $_HTML_TEMPLATE_FLEXY_TOKEN['statevars'][$s= array()// initialize statevars
  478.     }
  479.     /**
  480.     * tell the generator you are entering a block
  481.     *
  482.     * @return  boolean  parse error - out of bounds
  483.     * @access   public
  484.     */
  485.     function pullState(
  486.     {
  487.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  488.         
  489.         $s $_HTML_TEMPLATE_FLEXY_TOKEN['state'];
  490.         $_HTML_TEMPLATE_FLEXY_TOKEN['statevars'][$s= array()// initialize statevars
  491.         $_HTML_TEMPLATE_FLEXY_TOKEN['state']--;
  492.         if ($s<0{
  493.             return false;
  494.         }
  495.         return true;
  496.     }
  497.      /**
  498.     * get the real variable name formated x.y.z => $this->x->y->z
  499.     * if  a variable is in the stack it return $x->y->z
  500.     *
  501.     * @return  string PHP variable
  502.     * @access   public
  503.     */
  504.     
  505.     function toVar($s{
  506.         // wrap [] with quotes.
  507.         $s str_replace('[',"['",$s);
  508.         $s str_replace('%5b',"['",$s);
  509.         $s str_replace('%5B',"['",$s);
  510.         $s str_replace(']',"']",$s);
  511.         $s str_replace('%5d',"']",$s);
  512.         $s str_replace('%5D',"']",$s);
  513.         // strip the quotes if it's only numbers..
  514.         $s preg_replace("/'([-]?[0-9]+)'/""\\1",$s);
  515.         
  516.         $parts explode(".",$s);
  517.         
  518.         
  519.         $ret =  $this->findVar($parts[0]);
  520.         if (is_a($ret,'PEAR_Error')) {
  521.             return $ret;
  522.         }
  523.         
  524.         array_shift($parts);
  525.         
  526.         if (!count($parts)) {
  527.             return $ret;
  528.         }
  529.         foreach($parts as $p{
  530.             $ret .= "->{$p}";
  531.         }
  532.         return $ret;
  533.     }
  534.     /**
  535.     * do the stack lookup on the variable
  536.     * this relates to flexy
  537.     * t relates to the object being parsed.
  538.     *
  539.     * @return  string PHP variable
  540.     * @access   public
  541.     */
  542.     
  543.     function findVar($string
  544.     {
  545.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  546.     
  547.         if (!$string || $string == 't'{
  548.             return '$t';
  549.         }
  550.         if ($string == 'this'{
  551.             return '$this';
  552.         }
  553.         // accept global access on some string
  554.         if (@$GLOBALS['_HTML_TEMPLATE_FLEXY']['currentOptions']['globals'&&
  555.             preg_match('/^(_POST|_GET|_REQUEST|_SESSION|_COOKIE|GLOBALS)\[/',$string)) {
  556.             return '$'.$string;
  557.         
  558.         if (!@$GLOBALS['_HTML_TEMPLATE_FLEXY']['currentOptions']['privates'&&
  559.                 ($string{0== '_')) {
  560.                 return HTML_Template_Flexy::raiseError('HTML_Template_Flexy::Attempt to access private variable:'.
  561.                     " on line {$this->line} of {$GLOBALS['_HTML_TEMPLATE_FLEXY']['filename']}".
  562.                     ", Use options[privates] to allow this."
  563.                    HTML_TEMPLATE_FLEXY_ERROR_SYNTAX ,HTML_TEMPLATE_FLEXY_ERROR_RETURN);
  564.         }
  565.         
  566.         $lookup $string;
  567.         if ($p strpos($string,'[')) {
  568.             $lookup substr($string,0,$p);
  569.         }
  570.         
  571.         
  572.         for ($s $_HTML_TEMPLATE_FLEXY_TOKEN['state']$s > 0; $s--{
  573.             if (in_array($lookup $_HTML_TEMPLATE_FLEXY_TOKEN['statevars'][$s])) {
  574.                 return '$'.$string;
  575.             }
  576.         }
  577.         return '$t->'.$string;
  578.     }
  579.     /**
  580.     * add a variable to the stack.
  581.     *
  582.     * @param  string PHP variable
  583.     * @access   public
  584.     */
  585.     
  586.     function pushVar($string
  587.     {
  588.         global $_HTML_TEMPLATE_FLEXY_TOKEN;
  589.         $s $_HTML_TEMPLATE_FLEXY_TOKEN['state'];
  590.         $_HTML_TEMPLATE_FLEXY_TOKEN['statevars'][$s][$string;
  591.     }
  592.     
  593.      /**
  594.     * dump to text ATM
  595.     *
  596.     * 
  597.     * @access   public
  598.     */
  599.     
  600.     function dump({
  601.         echo "{$this->token}/" . (isset($this->tag? "<{$this->tag}>" : ''. ": {$this->value}\n";
  602.     }
  603.     
  604.     
  605.     
  606.     
  607. }

Documentation generated on Mon, 11 Mar 2019 14:21:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.