ParsedText
class ParsedText
Properties
bool | $decodeHtmlEntities | ||
protected bool | $hasEscapedChars | ||
bool | $hasReferences | ||
array | $linkReferences | ||
protected string | $text |
Methods
No description
No description
Return the character at given position
Decode a chunk of encoded text to be used as an attribute value
Find the first occurence of given substring starting at given position
Test whether given position is preceded by whitespace
Test whether given character is alphanumeric
Test whether given position is followed by whitespace
Test whether a length of text is surrounded by alphanumeric characters
Test whether given character is an ASCII whitespace character
Mark the boundary of a block in the original text
Overwrite part of the text with substitution characters ^Z (0x1A)
Details
at line 40
__construct(string $text)
No description
at line 67
string
__toString()
No description
at line 78
string
charAt(int $pos)
Return the character at given position
at line 91
string
decode(string $str)
Decode a chunk of encoded text to be used as an attribute value
Decodes escaped literals and removes slashes and 0x1A characters
at line 122
bool|int
indexOf(string $str, int $pos = 0)
Find the first occurence of given substring starting at given position
at line 133
bool
isAfterWhitespace(int $pos)
Test whether given position is preceded by whitespace
at line 144
bool
isAlnum(string $chr)
Test whether given character is alphanumeric
at line 155
bool
isBeforeWhitespace(int $pos)
Test whether given position is followed by whitespace
at line 167
bool
isSurroundedByAlnum(int $pos, int $len)
Test whether a length of text is surrounded by alphanumeric characters
at line 180
bool
isWhitespace(string $chr)
Test whether given character is an ASCII whitespace character
NOTE: newlines are normalized to LF before parsing so we don't have to check for CR
at line 191
void
markBoundary(int $pos)
Mark the boundary of a block in the original text
at line 203
void
overwrite(int $pos, int $len)
Overwrite part of the text with substitution characters ^Z (0x1A)