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

Class: Text_Wiki_Parse_List

Source Location: /Text_Wiki_BBCode-0.0.4/Text/Wiki/Parse/BBCode/List.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_List

List rule parser class for BBCode.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 bertrand Gugger

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
List rule parser class for BBCode.


[ Top ]


Class Variables

$regex =   "#\[list(?:=(.+?))?]\n?((?:((?R))|.)*?)\[/list]\n?#msi"

[line 45]

The regular expression used to parse the source text and find matches conforming to this rule. Used by the parse() method.
  • See: parse()
  • Access: public

Type:   string


[ Top ]

$regexElement =   '#\[\*](.*?)(?=\[\*]|$)\n?#msi'

[line 56]

The regular expression used in second stage to find list's elements used by process() to call back processElement()

Type:   string


[ Top ]



Method Detail

process   [line 109]

A process( array &$matches)

Generates a replacement for the matched text. Returned token options are:

'type' => 'bullet_list_start' : the start of a bullet list 'bullet_list_end' : the end of a bullet list 'number_list_start' : the start of a number list 'number_list_end' : the end of a number list 'item_start' : the start of item text (bullet or number) 'item_end' : the end of item text (bullet or number) 'unknown' : unknown type of list or item

'level' => the indent level (0 for the first level, 1 for the second, etc)

'count' => the list item number at this level. not needed for xhtml, but very useful for PDF and RTF.

'format' => the optional enumerating type : A, a, I, i, or 1 (default) as HTML

  • Return: delimited token to be used as a placeholder in the source text and containing the original block of text
  • Access: public

Parameters:

array   &$matches   —  The array of matches from parse().

[ Top ]

processElement   [line 175]

A processElement( array &$matches)

Generates a replacement for the matched list elements. Token options are:

'type' => '[listType]_item_start' : the start of item text (bullet or number) '[listType]_item_end' : the end of item text (bullet or number) where [listType] is bullet or number

'level' => the indent level (0 for the first level, 1 for the second, etc)

'count' => the item ordeer at this level.

  • Return: delimited token to be used as a placeholder in the source text and containing the original block of text
  • Access: public

Parameters:

array   &$matches   —  The array of matches from parse().

[ Top ]


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