phpDocumentor phpDocumentor
Parsers
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

Source for file XMLpackagePageParser.inc

Documentation is available at XMLpackagePageParser.inc

  1. <?php
  2. /**
  3.  * Parser for XML DocBook-based phpDocumentor tutorials
  4.  * 
  5.  * phpDocumentor :: automatic documentation generator
  6.  * 
  7.  * PHP versions 4 and 5
  8.  *
  9.  * Copyright (c) 2002-2006 Gregory Beaver
  10.  * 
  11.  * LICENSE:
  12.  * 
  13.  * This library is free software; you can redistribute it
  14.  * and/or modify it under the terms of the GNU Lesser General
  15.  * Public License as published by the Free Software Foundation;
  16.  * either version 2.1 of the License, or (at your option) any
  17.  * later version.
  18.  * 
  19.  * This library is distributed in the hope that it will be useful,
  20.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  22.  * Lesser General Public License for more details.
  23.  * 
  24.  * You should have received a copy of the GNU Lesser General Public
  25.  * License along with this library; if not, write to the Free Software
  26.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  27.  *
  28.  * @package    phpDocumentor
  29.  * @subpackage Parsers
  30.  * @author     Gregory Beaver <[email protected]>
  31.  * @copyright  2002-2006 Gregory Beaver
  32.  * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL
  33.  * @version    CVS: $Id: XMLpackagePageParser.inc,v 1.10 2006/05/22 01:07:28 cellog Exp $
  34.  * @tutorial   tutorials.pkg
  35.  * @link       http://www.phpdoc.org
  36.  * @link       http://pear.php.net/PhpDocumentor
  37.  * @since      1.2
  38.  */
  39. /** when <programlisting> is found */
  40. define('PHPDOCUMENTOR_PDP_EVENT_PROGRAMLISTING'600);
  41. /** when <programlisting> is found */
  42. define('PHPDOCUMENTOR_PDP_STATE_PROGRAMLISTING'700);
  43. /** when a DocBook <tag> is found */
  44. define('PHPDOCUMENTOR_PDP_EVENT_TAG'601);
  45. /** when a DocBook <tag> is found */
  46. define('PHPDOCUMENTOR_PDP_STATE_TAG'701);
  47. /** when <![CDATA[ ]]> is found */
  48. define('PHPDOCUMENTOR_PDP_EVENT_CDATA'602);
  49. /** when <![CDATA[ ]]> is found */
  50. define('PHPDOCUMENTOR_PDP_STATE_CDATA'702);
  51. /** when tag attributes name="value" are found */
  52. define('PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES'603);
  53. /** when tag attributes name="value" are found */
  54. define('PHPDOCUMENTOR_PDP_STATE_ATTRIBUTES'703);
  55. /** when tag attributes name="value" are found */
  56. define('PHPDOCUMENTOR_PDP_EVENT_ENTITY'604);
  57. /** when tag attributes name="value" are found */
  58. define('PHPDOCUMENTOR_PDP_STATE_ENTITY'704);
  59.  
  60. /**
  61.  * Used to parse XML DocBook-based tutorials
  62.  * @package phpDocumentor
  63.  * @subpackage Parsers
  64.  * @author Greg Beaver <[email protected]>
  65.  * @since 1.2
  66.  */
  67. class XMLPackagePageParser extends Parser
  68. {
  69.     /** @var array */
  70.     var $eventHandlers = array(
  71.                                PHPDOCUMENTOR_PDP_EVENT_TAG => 'handleTag',
  72.                                PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES => 'handleAttributes',
  73.                                PHPDOCUMENTOR_PDP_EVENT_CDATA => 'handleCData',
  74.                                PARSER_EVENT_NOEVENTS => 'defaultHandler',
  75.                                PARSER_EVENT_COMMENTBLOCK => 'ignoreHandler',
  76.                                PARSER_EVENT_OUTPHP => 'ignoreHandler',
  77.                                PARSER_EVENT_QUOTE => 'handleQuote',
  78.                                PHPDOCUMENTOR_PDP_EVENT_ENTITY => 'handleEntity',
  79.                                );
  80.     
  81.     /**
  82.      * @var array 
  83.      */
  84.     var $pars = array();
  85.     
  86.     var $refsect1id = false;
  87.     var $refsect2id = false;
  88.     var $refsect3id = false;
  89.     /**
  90.      * @var array the tag stack
  91.      */
  92.     var $context;
  93.     /**#@+ @access private */
  94.     var $_gettoc false;
  95.     var $_toc array();
  96.     var $_cursection 0;
  97.     /**#@-*/
  98.     /**
  99.      * Set up the wordparser
  100.      *
  101.      * {@source } 
  102.      * @uses ObjectWordParser
  103.      */
  104.     function XMLPackagePageParser()
  105.     {
  106.         $this->wp new ObjectWordParser(true);
  107.     }
  108.     /**
  109.      * Parse a new file
  110.      *
  111.      * @param    string    $parse_data 
  112.      * @param    array    $tutorial for format, see {@link Io::getTutorials()}
  113.      * @staticvar    integer    used for recursion limiting if a handler for an event is not found
  114.      * @return    bool 
  115.      * @uses parserTutorial using {@link Publisher::PublishEvent()}, a new tutorial
  116.      *                       is created from the file parsed, and passed to the
  117.      *                       Intermediate Parser
  118.      */
  119.     function parse ($parse_data$tutorial)
  120.     {
  121.         $tempparse new ppageParser;
  122.         $parse_data $tempparse->parse($parse_data,true,$tutorial['package'],$tutorial['subpackage'],
  123.                                         basename($tutorial['path']),$tutorial['category']$tutorial['path']);
  124.         unset($tempparse);
  125.         static $endrecur 0;
  126.         if (!is_array($parse_data|| count($parse_data== 0)
  127.         {
  128.             return false;
  129.         }
  130.         $this->setupStates();
  131.  
  132.         // initialize variables so E_ALL error_reporting doesn't complain
  133.                 $pevent 0;
  134.         $word 0;
  135.         $this->p_vars['start'true;
  136.         $this->p_vars['event_stack'new EventStack;
  137.  
  138.         $this->wp->setup($parse_data,false);
  139.         $this->wp->setWhitespace(true);
  140.         $this->context = array();
  141.         if (isset($this->curtag)) unset($this->curtag);
  142.  
  143.         do
  144.         {
  145.             $lpevent $pevent;
  146.             $pevent $this->p_vars['event_stack']->getEvent();
  147.             if ($lpevent != $pevent)
  148.             {
  149.                 $this->p_vars['last_pevent'$lpevent;
  150.             }
  151.  
  152.             if ($this->p_vars['last_pevent'!= $pevent)
  153.             {
  154.                 // its a new event so the word parser needs to be reconfigured 
  155.                                 $this->configWordParser($pevent);
  156.             }
  157.  
  158.  
  159.             $this->p_vars['last_word'$word;
  160.             $word $this->wp->getWord();
  161.  
  162.             if (0)//PHPDOCUMENTOR_DEBUG == true)
  163.                         {
  164.                 echo "----------------\n";
  165.                 echo "LAST: |" $this->p_vars['last_word'"|\n";
  166. //                echo "INDEX: ".$this->p_vars['curpar']."\n";
  167.                                 echo "PEVENT: " $this->getParserEventName($pevent"\n";
  168.                 echo "LASTPEVENT: " $this->getParserEventName($this->p_vars['last_pevent']"\n";
  169.                 echo $this->wp->getPos(" WORD: |$word|\n\n";
  170. //                echo '"'.$this->p_vars['quote_data']."\"\n";
  171.                         }
  172.             if (isset($this->eventHandlers[$pevent]))
  173.             {
  174.                 $handle $this->eventHandlers[$pevent];
  175.                 if ($word !== false$this->$handle($word$pevent);
  176.             else
  177.             {
  178.                 debug('WARNING: possible error, no XMLPackagePageParser handler for event number '.$pevent);
  179.                 if ($endrecur++ == 25)
  180.                 {
  181.                     die("FATAL ERROR, recursion limit reached");
  182.                 }
  183.             }
  184.             $this->p_vars['start'false;
  185.         while (!($word === false));
  186.         if (count($this->_toc&& isset($this->p_vars['toc']))
  187.         {
  188.             $a $this->curtag->getTOC($this->p_vars['toc']);
  189.             $a->setTOC($this->_toc);
  190.             $a->setPath($tutorial['path']);
  191.             $this->curtag->setTOC($this->p_vars['toc'],$a);
  192.         }
  193.         $this->PublishEvent(PHPDOCUMENTOR_EVENT_TUTORIAL,new parserTutorial($this->curtag$tutorial));
  194.         return $this->curtag;
  195.     }
  196.     
  197.     /**#@+
  198.      * @access private
  199.      * @param string|parserInlineTagtoken
  200.      * @param integer parser event
  201.      */
  202.     function defaultHandler($word$pevent)
  203.     {
  204.         if (is_string($word&& $this->checkEventPush($word$pevent))
  205.         {
  206.             return;
  207.         }
  208.     }
  209.     
  210.     function ignoreHandler($word$pevent)
  211.     {
  212.         $this->checkEventPop($word$pevent);
  213.     }
  214.     
  215.     /**
  216.      * handler for QUOTE.
  217.      * this handler recognizes strings defined with double quotation marks (") and handles them correctly
  218.      * in any place that they legally appear in php code
  219.      */
  220.     
  221.     function handleQuote($word$pevent)
  222.     {
  223.         if ($this->p_flags['reset_quote_data'=== true)
  224.         {
  225.             $this->p_flags['reset_quote_data'false;
  226.             $this->p_vars['quote_data'"";
  227.         }
  228.         if (!is_object($word)) $this->checkEventPush$word$pevent);
  229.         if (is_object($word))
  230.         {
  231.             $this->p_vars['quote_data'$word;
  232.         else
  233.         {
  234.             if ($word != "\"")
  235.             {
  236.                 if (!is_object($this->p_vars['quote_data']))
  237.                 {
  238.                     $this->p_vars['quote_data'.= $word;
  239.                 }
  240.             }
  241.             if ($word == '>')
  242.             {
  243.                 if (is_object($this->p_vars['quote_data']))
  244.                 {
  245.                     $this->p_vars['quote_data''{@id '.$this->p_vars['quote_data']->id.'}';
  246.                 }
  247.                 addErrorDie(PDERROR_UNTERMINATED_ATTRIB,
  248.                     $this->curtag->name,$this->p_vars['attrname'],$this->p_vars['quote_data']);
  249.             }
  250.             if ($this->checkEventPop($word,$pevent))
  251.             {
  252.                 $this->p_flags['reset_quote_data'true;
  253.             }
  254.         }
  255.     }
  256.     
  257.     /**
  258.      * Handles all XML DocBook tags
  259.      */
  260.     function handleTag($word$pevent)
  261.     {
  262.         if (isset($this->curtag&& $this->curtag->hasTitle(&& $this->_gettoc && $this->_gettoc->name == $this->curtag->name)
  263.         {
  264.             if (isset($this->_toc[$this->_cursection]))
  265.             {
  266.                 $this->_toc[$this->_cursection]['title'$this->curtag->_title;
  267.                 $this->_cursection++;
  268.             }
  269.             $this->_gettoc false;
  270.         }
  271.         if ($this->p_vars['last_word'== '<')
  272.         // get tag name
  273.             $this->p_flags['begin_tag'true;
  274.             array_push($this->context,$word);
  275. //            if (isset($this->curtag)) debug("pushed ".$this->curtag->name);
  276.             if (isset($this->curtag))
  277.             {
  278.                 array_push($this->pars,$this->curtag);
  279.             }
  280.             $this->curtag new parserXMLDocBookTag($word);
  281.         elseif ($this->p_vars['last_word'== '</' || $word == '/>')
  282.         {
  283.             $tag array_pop($this->context);
  284.             if ($word == '/>'{
  285.                 // all is OK
  286.                 $this->checkEventPop($word$pevent);
  287.                 $word $tag;
  288.             }
  289.             if ($tag != $word)
  290.             {
  291.                 addErrorDie(PDERROR_UNMATCHED_TUTORIAL_TAG,$tag,$word,$this->curtag->getString());
  292.             }
  293.             if (in_array($this->curtag->namearray('refentry''refsect1''refsect2''refsect3')))
  294.             {
  295.                 if (!isset($this->curtag->_id))
  296.                 {
  297.                     $title '';
  298.                     if (isset($this->curtag->_title))
  299.                     {
  300.                         $title $this->curtag->_title->getString();
  301.                     }
  302.                     addWarning(PDERROR_NO_DOCBOOK_ID$this->curtag->name$title);
  303.                 }
  304.             }
  305.             $this->p_flags['begin_tag'false;
  306.             $curtag @array_pop($this->pars);
  307. //            debug("popped $tag ".$curtag->name.' I am '.$this->curtag->name);
  308.             if ($curtag)
  309.             {
  310.                 if ($this->curtag->name == 'refsect1'$this->refsect1id false;
  311.                 if ($this->curtag->name == 'refsect2'$this->refsect2id false;
  312.                 if ($this->curtag->name == 'refsect3'$this->refsect3id false;
  313.                 $curtag->add($this->curtag);
  314. //                debug("added ".$this->curtag->name." to ".$curtag->name.' '.$curtag->id);
  315.                 $this->curtag $curtag;
  316.             else
  317.             {
  318. //                debug("here");
  319.             }
  320.         elseif (is_string($word))
  321.         {
  322.             if (!($e $this->checkEventPush($word$pevent)))
  323.             {
  324.                 if ($this->checkEventPop($word$pevent))
  325.                 {
  326.                     if ($this->p_flags['begin_tag'])
  327.                     {
  328.                         $this->p_vars['event_stack']->pushEvent(PHPDOCUMENTOR_PDP_EVENT_TAG);
  329.                         $this->p_vars['event_stack']->pushEvent(PHPDOCUMENTOR_PDP_EVENT_CDATA);
  330.                         $this->p_vars['last_tag'array_pop($this->context);
  331.                         array_push($this->context,$this->p_vars['last_tag']);
  332.                         $this->p_flags['in_cdata'false;
  333.                     }
  334.                     return;
  335.                 }
  336.             else
  337.             {
  338.                 $this->p_flags['start_attr'true;
  339.                 $this->p_flags['end_attr'false;
  340.             }
  341.     }
  342.     
  343.     /**
  344.      * Handle CData sections
  345.      */
  346.     function handleCData($word$pevent)
  347.     {
  348.         if ($this->curtag->name == 'refentry' && phpDocumentor_get_class($word== 'parsertocinlinetag')
  349.         {
  350.             $this->p_vars['toc'$this->curtag->getTOC();
  351.         }
  352.         if (is_string($word&& !$this->p_flags['in_cdata'])
  353.         {
  354.             if ($this->checkEventPop($word$pevent))
  355.             {
  356.                 return;
  357.             }
  358.             if ($this->checkEventPush($word$pevent))
  359.             {
  360.                 return;
  361.             }
  362.         }
  363.         if (is_string($word&& $word == '<![CDATA[')
  364.         {
  365.             $this->curtag->startCData();
  366.             $this->p_flags['in_cdata'true;
  367.         elseif ($this->p_flags['in_cdata'&& is_string($word&& $word == ']]>')
  368.         {
  369.             $this->curtag->endCData();
  370.             $this->p_flags['in_cdata'false;
  371.         else
  372.         {
  373.             if ($this->p_flags['in_cdata'])
  374.             $this->curtag->addCData($word);
  375.             else
  376.             $this->curtag->add($word);
  377.         }
  378.     }
  379.     
  380.     /**
  381.      * Handle Entities like &rdquo;
  382.      */
  383.     function handleEntity($word$pevent)
  384.     {
  385.         if (!$word)
  386.         {
  387.             if (!isset($this->p_vars['entity_name']))
  388.                 $this->p_vars['entity_name''';
  389.             addErrorDie(PDERROR_UNTERMINATED_ENTITY,$this->p_vars['entity_name']);
  390.         }
  391.         $e $this->checkEventPop($word$pevent);
  392.         if ($word && !$e$this->p_vars['entity_name'$word;
  393.         if ($e)
  394.         {
  395.             $entity new parserEntity($this->p_vars['entity_name']);
  396.             unset($this->p_vars['entity_name']);
  397.             $this->curtag->add($entity);
  398.         }
  399.     }
  400.     
  401.     /**
  402.      * Handle Tag attributes name="value"
  403.      */
  404.     function handleAttributes($word$pevent)
  405.     {
  406.         if ($this->checkEventPush($word$pevent)) return;
  407.         if ($word == '=')
  408.         {
  409.             $this->p_flags['start_attr'false;
  410.             $this->p_vars['end_attr'true;
  411.         else
  412.         {
  413.             if ($this->p_flags['start_attr'])
  414.             {
  415.                 $this->p_vars['attrname'$word;
  416.             else
  417.             {
  418.                 if (isset($this->p_vars['attrname']))
  419.                 {
  420.                     $value $this->p_vars['quote_data'];
  421.                     if (phpDocumentor_get_class($value== 'parseridinlinetag')
  422.                     // "inherit" the parent section's id, so
  423.                       // <refsect1 id="{@id test"}> <!-- id is 'test' -->
  424.                       // ...
  425.                       //  <refsect2 id="{@id me}"> <!-- id is 'test.me' -->
  426.                       //  ...
  427.                       //   <refsect3 id="{@id out}"> <!-- id is 'test.me.out' -->
  428.                       //    <example id="{@id withexample}"> <!-- id is 'test.me.out.withexample' -->
  429.                         $a ($this->refsect1id $this->refsect1id '.' '');
  430.                         $a .= ($this->refsect2id $this->refsect2id '.' '');
  431.                         $a .= ($this->refsect3id $this->refsect3id '.' '');
  432.                         if ($this->curtag->name == 'refsect1')
  433.                         {
  434.                             $this->refsect1id $value->id;
  435.                         }
  436.                         if ($this->curtag->name == 'refsect2')
  437.                         {
  438.                             $this->refsect2id $value->id;
  439.                         }
  440.                         if ($this->curtag->name == 'refsect3')
  441.                         {
  442.                             $this->refsect3id $value->id;
  443.                         }
  444. //                            debug($value->id.' is now '.$a.$value->id);
  445.                         $value->id $a $value->id;
  446.                         if ($value->id != '')
  447.                         {
  448.                             if (isset($this->_toc[$this->_cursection]))
  449.                             {
  450.                                 $this->_cursection++;
  451.                             }
  452.                             $this->_toc[$this->_cursection]['id'$value;
  453.                             $this->_toc[$this->_cursection]['tag'new parserXMLDocBookTag($this->curtag->name);
  454. //                            debug("set gettoc to ".$this->curtag->name .' '. $value->id);
  455.                             $this->_gettoc $this->curtag;
  456.                         }
  457.                     }
  458.                     $this->curtag->addAttribute($this->p_vars['attrname'],$value);
  459.                     unset($this->p_vars['attrname']);
  460.                     if (is_string($word&& $this->checkEventPop($word$pevent))
  461.                     {
  462.                         $this->p_flags['start_attr'true;
  463.                         $this->p_flags['end_attr'false;
  464.                         $this->wp->setPos($this->wp->getPos(strlen($word));
  465.                     else {
  466.                         $this->wp->setPos($this->wp->getPos(strlen($word));
  467.                     }
  468.                     return;
  469.                 }
  470.             }
  471.         }
  472.         if (is_string($word&& $this->checkEventPop($word$pevent))
  473.         {
  474.             $this->p_flags['start_attr'true;
  475.             $this->p_flags['end_attr'false;
  476.             $this->wp->setPos($this->wp->getPos(strlen($word));
  477.         }
  478.     }
  479.     /**#@-*/
  480.     
  481.          * setup the parser tokens, and the pushEvent/popEvent arrays
  482.      * @see $tokens, $pushEvent, $popEvent
  483.      */
  484.     
  485.     function setupStates()
  486.     {
  487.         $this->_gettoc false;
  488.         $this->_toc array();
  489.         $this->_cursection 0;
  490.         if (isset($this->p_vars['toc'])) unset($this->p_vars['toc']);
  491.         
  492.         $this->tokens[STATE_NOEVENTS]                     array('</','<!--','<!','<?','<');
  493.         $this->tokens[STATE_COMMENTBLOCK]                 array('-->');
  494.         $this->tokens[STATE_OUTPHP]                       array('?>','>');
  495.         $this->tokens[STATE_QUOTE]                        array("\\\"","\\\\","\"",'>');
  496.         $this->tokens[STATE_ESCAPE]                       false;// this tells the word parser to just cycle
  497.         $this->tokens[PHPDOCUMENTOR_PDP_STATE_TAG]        array('>',' ','/>');
  498.         $this->tokens[PHPDOCUMENTOR_PDP_STATE_CDATA]      array('&','<!--','</','<![CDATA[','<',']]>');
  499.         $this->tokens[PHPDOCUMENTOR_PDP_STATE_ATTRIBUTESarray('=','>','/>','"');
  500.         $this->tokens[PHPDOCUMENTOR_PDP_STATE_ENTITY]     array(';');
  501.  
  502.         // For each event word to event mapings
  503.         $this->pushEvent[PARSER_EVENT_NOEVENTS
  504.             array(
  505.                 '<!--' => PARSER_EVENT_COMMENTBLOCK,
  506.                 '<!' => PARSER_EVENT_OUTPHP,
  507.                 "</" => PHPDOCUMENTOR_PDP_EVENT_TAG,
  508.                 '<?' => PARSER_EVENT_OUTPHP,
  509.                 "<" => PHPDOCUMENTOR_PDP_EVENT_TAG,
  510.                 '&' => PHPDOCUMENTOR_PDP_EVENT_ENTITY,
  511.             );
  512. ##########################
  513.  
  514.         $this->pushEvent[PHPDOCUMENTOR_PDP_EVENT_TAG=
  515.             array(
  516.                 ' ' => PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES,
  517.             );
  518.          
  519.         $this->popEvent[PHPDOCUMENTOR_PDP_EVENT_TAGarray(">","/>");
  520. ##########################
  521.             array(
  522.                 '"' => PARSER_EVENT_QUOTE,
  523.             );
  524.  
  525.         $this->popEvent[PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTESarray(">","/>");
  526. ##########################
  527.  
  528.         $this->popEvent[PARSER_EVENT_COMMENTBLOCKarray("-->");
  529. ##########################
  530.         $this->pushEvent[PARSER_EVENT_QUOTE
  531.             array(
  532.                 "\\"    => PARSER_EVENT_ESCAPE
  533.             );
  534.         $this->popEvent[PARSER_EVENT_QUOTEarray("\"");
  535. ##########################
  536.  
  537.         $this->popEvent[PARSER_EVENT_OUTPHParray("?>",">");
  538. ##########################
  539.  
  540.         $this->popEvent[PHPDOCUMENTOR_PDP_EVENT_ENTITYarray(";");
  541. ##########################
  542.  
  543.         $this->pushEvent[PHPDOCUMENTOR_PDP_EVENT_CDATA=
  544.             array(
  545.                 "<" => PHPDOCUMENTOR_PDP_EVENT_TAG,
  546.                 '<!--' => PARSER_EVENT_COMMENTBLOCK,
  547.                 '<?' => PARSER_EVENT_OUTPHP,
  548.                 '&' => PHPDOCUMENTOR_PDP_EVENT_ENTITY,
  549.             );
  550.         $this->popEvent[PHPDOCUMENTOR_PDP_EVENT_CDATAarray("</");
  551.     }
  552.     
  553.     /**
  554.      * debugging function
  555.      *
  556.      * {@source } 
  557.      * @static
  558.      */
  559.     function getParserEventName ($value)
  560.     {    
  561.         $lookup array(
  562.             PARSER_EVENT_NOEVENTS         => "PARSER_EVENT_NOEVENTS",
  563.             PHPDOCUMENTOR_PDP_EVENT_TAG        => "PHPDOCUMENTOR_PDP_EVENT_TAG",
  564.             PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES        => "PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES",
  565.             PHPDOCUMENTOR_PDP_EVENT_CDATA        => "PHPDOCUMENTOR_PDP_EVENT_CDATA",
  566.             PHPDOCUMENTOR_PDP_EVENT_LIST    => "PHPDOCUMENTOR_PDP_EVENT_LIST",
  567.             PARSER_EVENT_QUOTE  => "PARSER_EVENT_QUOTE",
  568.             PHPDOCUMENTOR_PDP_EVENT_ENTITY => "PHPDOCUMENTOR_PDP_EVENT_ENTITY",
  569.             PHPDOCUMENTOR_PDP_EVENT_COMMENT => "PHPDOCUMENTOR_PDP_EVENT_COMMENT",
  570.             PHPDOCUMENTOR_PDP_EVENT_PI => "PHPDOCUMENTOR_PDP_EVENT_PI",
  571.         );
  572.         if (isset($lookup[$value]))
  573.         return $lookup[$value];
  574.         else return $value;
  575.     }
  576. }
  577. ?>

Documentation generated on Tue, 24 Oct 2006 09:27:07 -0500 by phpDocumentor 1.3.1