Texy
class Texy
Texy! - Convert plain text to XHTML format using process().
$texy = new Texy();
$html = $texy->process($text);
Constants
ALL |
|
NONE |
|
VERSION |
|
REVISION |
|
CONTENT_MARKUP |
|
CONTENT_REPLACED |
|
CONTENT_TEXTUAL |
|
CONTENT_BLOCK |
|
FILTER_ANCHOR |
|
FILTER_IMAGE |
|
XML |
|
HTML4_TRANSITIONAL |
|
HTML4_STRICT |
|
HTML5 |
|
XHTML1_TRANSITIONAL |
|
XHTML1_STRICT |
|
XHTML5 |
|
Properties
string | $encoding | ||
array | $allowed | ||
true|false|array | $allowedTags | ||
true|false|array | $allowedClasses | ||
true|false|array | $allowedStyles | ||
int | $tabWidth | ||
bool | $obfuscateEmail | ||
array | $urlSchemeFilters | ||
bool | $mergeLines | ||
array | $summary | ||
string | $styleSheet | ||
array | $alignClasses | ||
bool | $removeSoftHyphens | ||
static deprecated | $advertisingNotice | ||
string | $nontextParagraph | ||
ScriptModule | $scriptModule | ||
ParagraphModule | $paragraphModule | ||
HtmlModule | $htmlModule | ||
ImageModule | $imageModule | ||
LinkModule | $linkModule | ||
PhraseModule | $phraseModule | ||
EmoticonModule | $emoticonModule | ||
BlockModule | $blockModule | ||
HeadingModule | $headingModule | ||
HorizLineModule | $horizLineModule | ||
BlockQuoteModule | $blockQuoteModule | ||
ListModule | $listModule | ||
TableModule | $tableModule | ||
FigureModule | $figureModule | ||
TypographyModule | $typographyModule | ||
LongWordsModule | $longWordsModule | ||
HtmlOutputModule | $htmlOutputModule | ||
array | $_classes | ||
array | $_styles | ||
array | $dtd | DTD descriptor. |
|
static | $strictDTD | DEPRECATED | |
$cleaner | |||
$xhtml |
Methods
No description
Set HTML/XHTML output mode (overwrites self::$allowedTags)
Get HTML/XHTML output mode
Create array of all used modules ($this->modules).
No description
No description
No description
Converts document in Texy! to (X)HTML code.
Converts single line in Texy! to (X)HTML code.
Makes only typographic corrections.
Converts DOM structure to pure text.
Converts internal string representation to final HTML code in UTF-8.
Converts internal string representation to final HTML code in UTF-8.
Add new event handler.
Invoke registered after-handlers.
Generate unique mark - useful for freezing (folding) some substrings.
Filters bad URLs.
No description
No description
No description
No description
No description
Details
at line 217
__construct()
No description
at line 260
void
setOutputMode($mode)
Set HTML/XHTML output mode (overwrites self::$allowedTags)
at line 289
int
getOutputMode()
Get HTML/XHTML output mode
at line 299
protected
loadModules()
Create array of all used modules ($this->modules).
This array can be changed by overriding this method (by subclasses)
at line 326
final
registerLinePattern($handler, $pattern, $name, $againTest = null)
No description
at line 345
final
registerBlockPattern($handler, $pattern, $name)
No description
at line 364
final
registerPostLine($handler, $name)
No description
at line 386
string
process($text, $singleLine = false)
Converts document in Texy! to (X)HTML code.
at line 472
string
processLine($text)
Converts single line in Texy! to (X)HTML code.
at line 483
string
processTypo($text)
Makes only typographic corrections.
at line 506
string
toText()
Converts DOM structure to pure text.
at line 520
final string
stringToHtml($s)
Converts internal string representation to final HTML code in UTF-8.
at line 560
final string
stringToText($s)
Converts internal string representation to final HTML code in UTF-8.
at line 592
final void
addHandler($event, $callback)
Add new event handler.
at line 607
final mixed
invokeAroundHandlers($event, Parser $parser, array $args)
Invoke registered around-handlers.
at line 622
final void
invokeHandlers($event, array $args)
Invoke registered after-handlers.
at line 640
final string
protect($child, $contentType)
Generate unique mark - useful for freezing (folding) some substrings.
at line 662
final bool
checkURL($URL, $type)
Filters bad URLs.
at line 671
final
unProtect($html)
No description
at line 677
final
getLinePatterns()
No description
at line 683
final
getBlockPatterns()
No description
at line 689
final
getDOM()
No description
at line 695
final
__clone()
No description
at line 702
final static
freezeSpaces($s)
deprecated
deprecated
No description
at line 709
final static
unfreezeSpaces($s)
deprecated
deprecated
No description
at line 716
final static
normalize($s)
deprecated
deprecated
No description
at line 723
final static
webalize($s, $charlist = null)
deprecated
deprecated
No description
at line 730
final static
escapeHtml($s)
deprecated
deprecated
No description
at line 737
final static
unescapeHtml($s)
deprecated
deprecated
No description
at line 744
final static
outdent($s)
deprecated
deprecated
No description
at line 751
final static
isRelative($URL)
deprecated
deprecated
No description
at line 758
final static
prependRoot($URL, $root)
deprecated
deprecated
No description
at line 765
final
free()
deprecated
deprecated
No description
Traits
Better OOP experience.