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

Class: Text_Wiki_Parse_Colortext

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

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Colortext

Colored text rule parser class (with nesting) for BBCode.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 bertrand Gugger

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 34]
Colored text rule parser class (with nesting) for BBCode.


[ Top ]


Class Variables

$regex =  "'(?:\[color=(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|\#?[0-9a-f]{6})]((?:((?R))|.)*?)\[/color])'msi"

[line 46]

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

We match either [color..] ... [/color] nested

  • See: Text_Wiki_Parse::parse()
  • Access: public

Type:   string


[ Top ]



Method Detail

process   [line 68]

string process( array &$matches)

Generates a replacement for the matched text. Token options are:
  • 'type' => ['start'|'end'] The starting or ending point of the colored text.

The text itself is left in the source but may content bested blocks

  • 'level' => the level of nesting (starting 0)
  • 'color' => the color indicator

  • Return: Delimited by start/end tokens to be used as placeholder in the source text surrounding the text to be colored.
  • 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.