Base class for text processors
(string) The original, unformatted text.
(string) The final, formatted text.
(Entry) The entry used to resolve URIs.
(int) The ID fo the text filter.
(string) The human-readable name of the filter.
(boolean) Skip the surrounding markup, i.e. don't wrap in <P> tags.
static public function get( |
| ) |
Convenience function that returns a map of filter IDs to names.
Returns An associative array mapping filter IDs to filter names.
Gets an array of instances of the available textprocessors.
An array of TextProcessor objects.
public function setText( |
| ) |
Set the initia text to process
text | (string) The text to format |
Get the initial text passed for processing.
(string) The raw text
public function setEntry( |
| ) |
Set the entry object against which URIs will be resolved.
entry | (Entry) The entry object for resolution |
public function getHTML( |
| ) |
Get the formatted HTML text.
text | (string) Optional text to translate. Convenience parameter used for multiple calls on the same processor instance. |
(string) The formatted HTML
protected function fixIndividualURI( |
| ) |
Fixes a relative URI to be absolute.
If the formatter is passed a null entry, then relative URIs will not be resolved.
uri | (string) The relative URI to fix |
(string) The absolute URI.
protected function sanitizeText( |
| ) |
Strip HTML code out of a string. Note that the UNICODE_ESCAPE_HACK configuration constant can be used to switch between using the PHP htmlentities() and htmlspecialchars() functions to sanitize input. This is because htmlentities() has a nasty habit of mangling Unicode.
data | (string) The data to clear |
A copy of data with HTML special characters such as angle brackets and ampersands converted into their corresponding HTML entities. This will cause them to display in a web page as characters, not HTML markup.