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

Class: Text_Wiki_Parse_Function

Source Location: /Text_Wiki-0.23.0/Text/Wiki/Parse/Function.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Function

Baseline rule class for extension into a "real" parser component.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Text_Wiki_Parse

Text_Wiki_Parse::Text_Wiki_Parse()
Constructor for this parser rule.
Text_Wiki_Parse::getAttrs()
Extract 'attribute="value"' portions of wiki markup.
Text_Wiki_Parse::getConf()
Simple method to safely get configuration key values.
Text_Wiki_Parse::parse()
Abstrct method to parse source text for matches.
Text_Wiki_Parse::process()
Abstract method to generate replacements for matched text.

Class Details

[line 10]
Baseline rule class for extension into a "real" parser component.

Text_Wiki_Rule classes do not stand on their own; they are called by a Text_Wiki object, typcially in the transform()method. Each rule class performs three main activities: parse, process, and render.

The parse() method takes a regex and applies it to the whole block of source text at one time. Each match is sent as $matches to the process() method.

The process() method acts on the matched text from the source, and then processes the source text is some way. This may mean the creation of a delimited token using addToken(). In every case, the process() method returns the text that should replace the matched text from parse().



[ Top ]


Class Variables

$regex =  '/^(\<function\>)\n(.+)\n(\<\/function\>)(\s|$)/Umsi'

[line 12]


Type:   mixed
Overrides:   Array


[ Top ]



Method Detail

process   [line 14]

void process( &$matches)


Overrides Text_Wiki_Parse::process() (Abstract method to generate replacements for matched text.)

Parameters:

   &$matches   — 

[ Top ]


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