Constants |
public
Html2Text |
Methods |
public
__construct
(
$html
=
''
,
$options
=
[
]
)
|
public
get_text
()
|
public
getHtml
() Get the source HTML
|
public
getText
() Returns the text, converted from HTML.
|
public
p
()
|
public
print_text
()
|
public
set_base_url
(
$baseurl
)
|
public
set_html
(
$html
,
$from_file
=
false
)
|
public
setBaseUrl
(
$baseurl
) Sets a base URL to handle relative links.
|
public
setHtml
(
$html
) Set the source HTML
|
Properties |
protected
$baseurl
Contains the base URL that relative links should resolve to.
|
protected
$callbackSearch
List of preg* regular expression patterns to search for
|
protected
$converted
Indicates whether content in the $html variable has been converted yet.
|
protected
$entReplace
List of pattern replacements corresponding to patterns searched.
|
protected
$entSearch
List of preg* regular expression patterns to search for,
|
protected
$html
Contains the HTML content to convert.
|
protected $htmlFuncFlags |
protected
$linkList
Contains URL addresses from links to be rendered in plain text.
|
protected
$options
Various configuration options (able to be set in the constructor)
|
protected
$preContent
Temporary workspace used during PRE processing.
|
protected
$preReplace
List of pattern replacements corresponding to patterns searched for PRE body.
|
protected
$preSearch
List of preg* regular expression patterns to search for in PRE body,
|
protected
$replace
List of pattern replacements corresponding to patterns searched.
|
protected
$search
List of preg* regular expression patterns to search for,
|
protected
$text
Contains the converted, formatted text.
|
Methods |
protected
buildlinkList
(
$link
,
$display
,
$linkOverride
=
NULL
) Helper function called by preg_replace() on link replacement. Maintains an internal list of links to be displayed at the end of the
|
protected convert () |
protected
convertBlockquotes
(
$text
) Helper function for BLOCKQUOTE body conversion.
|
protected converter ( $text ) |
protected
convertPre
(
$text
) Helper function for PRE body conversion.
|
protected doConvert () |
protected
pregCallback
(
$matches
) Callback function for preg_replace_callback use.
|
protected
pregPreCallback
(
$matches
) Callback function for preg_replace_callback use in PRE content handler.
|
protected
strtoupper
(
$str
) Strtoupper multibyte wrapper function with HTML entities handling.
|
protected
tostrike
(
$str
) Helper function for DEL conversion.
|
protected
toupper
(
$str
) Strtoupper function with HTML tags and entities handling.
|
Methods |
private legacyConstruct ( $html = '' , $fromFile = false , array $options = [ ] ) |