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

Source for file Phplookup.php

Documentation is available at Phplookup.php

  1. <?php
  2. // $Id: Phplookup.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
  3.  
  4.  
  5. /**
  6. * Find source text marked for
  7. * lookup in the PHP online manual.
  8. *
  9. @author Paul M. Jones <pmjones@ciaweb.net>
  10. *
  11. @package Text_Wiki
  12. *
  13. */
  14.  
  15.     
  16.     
  17.     /**
  18.     * 
  19.     * The regular expression used to parse the source text and find
  20.     * matches conforming to this rule.  Used by the parse() method.
  21.     * 
  22.     * @access public
  23.     * 
  24.     * @var string 
  25.     * 
  26.     * @see parse()
  27.     * 
  28.     */
  29.     
  30.     var $regex = "/\[\[php (.+?)\]\]/";
  31.     
  32.     
  33.     /**
  34.     * 
  35.     * Generates a replacement for the matched text.  Token options are:
  36.     * 
  37.     * 'type' => ['start'|'end'] The starting or ending point of the
  38.     * teletype text.  The text itself is left in the source.
  39.     * 
  40.     * @access public
  41.     *
  42.     * @param array &$matches The array of matches from parse().
  43.     *
  44.     * @return string A pair of delimited tokens to be used as a
  45.     *  placeholder in the source text surrounding the teletype text.
  46.     *
  47.     */
  48.     
  49.     function process(&$matches)
  50.     {
  51.         return $this->wiki->addToken(
  52.             $this->rulearray('text' => $matches[1])
  53.         );
  54.     }
  55. }
  56. ?>

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