This class handles formatting poems in WikiText, specifically anything within <poem></poem> tags.
More...
|
static | init (&$parser) |
| Bind the renderPoem function to the <poem> tag.
|
|
static | renderPoem ( $in, $param=[], $parser=null, $frame=false) |
| Parse the text into proper poem format.
|
|
|
static | indentVerse ( $m) |
| Callback for preg_replace_callback() that wraps content in an indented span.
|
|
static | replaceSpaces ( $m) |
| Callback for preg_replace_callback() that replaces spaces with non-breaking spaces.
|
|
This class handles formatting poems in WikiText, specifically anything within <poem></poem> tags.
Definition at line 6 of file Poem.class.php.
◆ indentVerse()
static Poem::indentVerse |
( |
| $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that wraps content in an indented span.
- Parameters
-
array | $m | Matches from the regular expression
- $m[1] consists of 1 or more colons
- $m[2] consists of the text after the colons
|
- Returns
- string
Definition at line 76 of file Poem.class.php.
References $attribs.
◆ init()
static Poem::init |
( |
& | $parser | ) |
|
|
static |
Bind the renderPoem function to the <poem> tag.
- Parameters
-
- Returns
- bool true
Definition at line 12 of file Poem.class.php.
References $parser.
◆ renderPoem()
static Poem::renderPoem |
( |
| $in, |
|
|
| $param = [], |
|
|
| $parser = null, |
|
|
| $frame = false ) |
|
static |
Parse the text into proper poem format.
- Parameters
-
string | $in | The text inside the poem tag |
array | $param | |
Parser | $parser | |
bool | $frame | |
- Returns
- string
Definition at line 25 of file Poem.class.php.
References $attribs, and $parser.
◆ replaceSpaces()
static Poem::replaceSpaces |
( |
| $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that replaces spaces with non-breaking spaces.
- Parameters
-
array | $m | Matches from the regular expression
- $m[1] consists of 1 or more spaces
|
- Returns
- mixed
Definition at line 65 of file Poem.class.php.
The documentation for this class was generated from the following file: