Caches a regular expression that delimits text to be parsed.
More...
|
| split (&$text) |
| Splits a text into sections that may be linked and sections that may not be linked (e.g., because they already are a link, or a template, etc.). More...
|
|
Caches a regular expression that delimits text to be parsed.
Definition at line 29 of file Splitter.php.
static LinkTitles\Splitter::invalidate |
( |
| ) |
|
|
static |
Invalidates the singleton instance.
Used for unit testing.
Definition at line 70 of file Splitter.php.
static LinkTitles\Splitter::singleton |
( |
Config & |
$config = null | ) |
|
|
static |
Gets the Splitter singleton; may build one with the given config or the default config if none is given.
If the instance was already created, it does not matter what Config this method is called with. To re-create an instance with a different Config, call Splitter::invalidate() first.
- Parameters
-
Definition at line 55 of file Splitter.php.
LinkTitles\Splitter::split |
( |
& |
$text | ) |
|
Splits a text into sections that may be linked and sections that may not be linked (e.g., because they already are a link, or a template, etc.).
- Parameters
-
String | &$text | Text to split. |
- Returns
- Array of strings where even indexes point to linkable sections.
Definition at line 86 of file Splitter.php.
The documentation for this class was generated from the following file: