Methods
__construct
__construct(string $html = '',array $options = array())
Arguments
$options
array
Set configuration options
Helper function called by preg_replace() on link replacement.
buildlinkList(string $link,string $display,null $linkOverride = null): string
Maintains an internal list of links to be displayed at the end of the
text, with numeric indices to the original point in the text they
appeared. Also makes an effort at identifying and handling absolute
and relative links.
Arguments
$link
string
URL of the link
$display
string
Part of the text to associate number with
Response
string
Helper function for BLOCKQUOTE body conversion.
convertBlockquotes( &$text)
converter
converter( &$text)
Helper function for PRE body conversion.
convertPre( &$text)
Get the source HTML
getHtml(): string
Returns the text, converted from HTML.
getText(): string
Response
string
Plain text
legacyConstruct
legacyConstruct( $html = '', $fromFile = false,array $options = array())
Callback function for preg_replace_callback use.
pregCallback(array $matches): string
Arguments
$matches
array
PREG matches
Response
string
Callback function for preg_replace_callback use in PRE content handler.
pregPreCallback(array $matches): string
Arguments
$matches
array
PREG matches
Response
string
set_base_url
set_base_url( $baseurl)
set_html
set_html( $html, $from_file = false)
Sets a base URL to handle relative links.
setBaseUrl(string $baseurl)
Set the source HTML
setHtml(string $html)
Arguments
$html
string
HTML source content
Strtoupper multibyte wrapper function with HTML entities handling.
strtoupper(string $str): string
Arguments
$str
string
Text to convert
Response
string
Converted text
Helper function for DEL conversion.
tostrike( $str): string
Arguments
Response
string
Converted text
Strtoupper function with HTML tags and entities handling.
toupper(string $str): string
Arguments
$str
string
Text to convert
Response
string
Converted text
Constants
Properties
htmlFuncFlags
htmlFuncFlags :
Contains the HTML content to convert.
html :string
Contains the converted, formatted text.
text :string
List of preg* regular expression patterns to search for,
used in conjunction with $replace.
search :array
List of pattern replacements corresponding to patterns searched.
replace :array
List of preg* regular expression patterns to search for,
used in conjunction with $entReplace.
entSearch :array
List of pattern replacements corresponding to patterns searched.
entReplace :array
List of preg* regular expression patterns to search for
and replace using callback function.
callbackSearch :array
List of preg* regular expression patterns to search for in PRE body,
used in conjunction with $preReplace.
preSearch :array
List of pattern replacements corresponding to patterns searched for PRE body.
preReplace :array
Temporary workspace used during PRE processing.
preContent :string
Contains the base URL that relative links should resolve to.
baseurl :string
Indicates whether content in the $html variable has been converted yet.
converted :boolean
Contains URL addresses from links to be rendered in plain text.
linkList :array
Various configuration options (able to be set in the constructor)
options :array