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