This class handles formatting poems in WikiText, specifically anything within <poem></poem> tags.
More...
|
static | init (Parser $parser) |
| Bind the renderPoem function to the <poem> tag.
|
|
static | renderPoem ( $in, array $param=[], Parser $parser, PPFrame $frame) |
| Parse the text into proper poem format.
|
|
|
static | indentVerse (array $m) |
| Callback for preg_replace_callback() that wraps content in an indented span.
|
|
static | replaceSpaces (array $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.
- Note
- CC0-1.0
- Author
- Nikola Smolenski smole.nosp@m.nsk@.nosp@m.eunet.nosp@m..yu
Definition at line 10 of file Poem.php.
◆ indentVerse()
static Poem::indentVerse |
( |
array | $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that wraps content in an indented span.
- Parameters
-
string[] | $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 79 of file Poem.php.
References $attribs.
◆ init()
static Poem::init |
( |
Parser | $parser | ) |
|
|
static |
Bind the renderPoem function to the <poem> tag.
- Parameters
-
Definition at line 15 of file Poem.php.
References $parser.
◆ renderPoem()
static Poem::renderPoem |
( |
| $in, |
|
|
array | $param = [], |
|
|
Parser | $parser, |
|
|
PPFrame | $frame ) |
|
static |
Parse the text into proper poem format.
- Parameters
-
string | null | $in | The text inside the poem tag |
string[] | $param | |
Parser | $parser | |
PPFrame | $frame | |
- Returns
- string
Definition at line 27 of file Poem.php.
References $attribs, and $parser.
◆ replaceSpaces()
static Poem::replaceSpaces |
( |
array | $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that replaces spaces with non-breaking spaces.
- Parameters
-
string[] | $m | Matches from the regular expression
- $m[1] consists of 1 or more spaces
|
- Returns
- string
Definition at line 68 of file Poem.php.
The documentation for this class was generated from the following file: