Horde_Text_Filter_Text2html
extends Horde_Text_Filter_Base
in package
Turn text into HTML with varying levels of parsing. For no html whatsoever, use htmlspecialchars() instead.
Copyright 2002-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
- MICRO = 2
- MICRO_LINKURL = 3
- NOHTML = 4
- NOHTML_NOBREAK = 5
- PASSTHRU = 0
- SYNTAX = 1
- $_params : array<string|int, mixed>
- Filter parameters.
- __construct() : mixed
- Constructor.
- getPatterns() : array<string|int, mixed>
- Returns a hash with replace patterns.
- postProcess() : string
- Executes any code necessaray after applying the filter patterns.
- preProcess() : string
- Executes any code necessary before applying the filter patterns.
Constants
MICRO
public
mixed
MICRO
= 2
MICRO_LINKURL
public
mixed
MICRO_LINKURL
= 3
NOHTML
public
mixed
NOHTML
= 4
NOHTML_NOBREAK
public
mixed
NOHTML_NOBREAK
= 5
PASSTHRU
public
mixed
PASSTHRU
= 0
SYNTAX
public
mixed
SYNTAX
= 1
Properties
$_params
Filter parameters.
protected
array<string|int, mixed>
$_params
= array('charset' => 'ISO-8859-1', 'class' => 'fixed', 'emails' => \false, 'flowed' => '<blockquote>', 'linkurls' => \false, 'text2html' => \false, 'parselevel' => 0, 'space2html' => \false, 'secretKey' => \null)
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Parameters specific to this driver:
- charset: (string) The charset to use for htmlspecialchars() calls.
- class: (string) See Horde_Text_Filter_Linkurls::.
- emails: (array) TODO
- flowed: (string) For flowed text, the HTML blockquote tag to insert before each level.
- linkurls: (array) TODO
- parselevel: (integer) The parselevel of the output.
- PASSTHRU: No action. Pass-through. Included for completeness.
- SYNTAX: Allow full html, also do line-breaks, in-lining, syntax-parsing.
- MICRO: Micro html (only line-breaks, in-line linking).
- MICRO_LINKURL: Micro html (only line-breaks, in-line linking of URLS; no email addresses are linked).
- NOHTML: No html (all stripped, only line-breaks).
- NOHTML_NOBREAK: No html whatsoever, no line breaks added. Included for completeness.
- space2html: (array) TODO
Return values
mixed —getPatterns()
Returns a hash with replace patterns.
public
getPatterns() : array<string|int, mixed>
Return values
array<string|int, mixed> —Patterns hash.
postProcess()
Executes any code necessaray after applying the filter patterns.
public
postProcess(string $text) : string
Parameters
- $text : string
-
The text after the filtering.
Return values
string —The modified text.
preProcess()
Executes any code necessary before applying the filter patterns.
public
preProcess(mixed $text) : string
Parameters
- $text : mixed
-
The text before the filtering. Either a string or a Horde_Text_Flowed object (since 1.1.0).
Return values
string —The modified text.