parser
class parser implements parser_interface
s9e\TextFormatter\Parser adapter
Properties
protected dispatcher_interface | $dispatcher | ||
protected Parser | $parser |
Methods
Constructor
Parse given text
Disable a specific BBCode
Disable BBCodes in general
Disable the censor
Disable magic URLs
Disable smilies
Enable a specific BBCode
Enable BBCodes in general
Enable the censor
Enable magic URLs
Enable smilies
Get the list of errors that were generated during last parsing
Return the instance of s9e\TextFormatter\Parser used by this object
Set a variable to be used by the parser
Set multiple variables to be used by the parser
Filter a flash object's height
Filter a flash object's width
Filter the value used in a [size] BBCode
Filter an image's URL to enforce restrictions on its dimensions
Test whether given tag consumes text that looks like BBCode-styled markup
Details
at line 43
__construct(driver_interface $cache, string $key, factory $factory, dispatcher_interface $dispatcher)
Constructor
at line 76
string
parse(string $text)
Parse given text
at line 110
null
disable_bbcode(string $name)
Disable a specific BBCode
at line 118
disable_bbcodes()
Disable BBCodes in general
at line 126
disable_censor()
Disable the censor
at line 134
disable_magic_url()
Disable magic URLs
at line 143
disable_smilies()
Disable smilies
at line 152
null
enable_bbcode(string $name)
Enable a specific BBCode
at line 160
enable_bbcodes()
Enable BBCodes in general
at line 168
enable_censor()
Enable the censor
at line 176
enable_magic_url()
Enable magic URLs
at line 185
enable_smilies()
Enable smilies
at line 197
array[]
get_errors()
Get the list of errors that were generated during last parsing
at line 269
Parser
get_parser()
Return the instance of s9e\TextFormatter\Parser used by this object
at line 277
null
set_var(string $name, mixed $value)
Set a variable to be used by the parser
- max_font_size
- max_img_height
- max_img_width
- max_smilies
- max_urls
at line 296
null
set_vars(array $vars)
Set multiple variables to be used by the parser
at line 314
static mixed
filter_flash_height(string $height, int $max_height, Logger $logger)
Filter a flash object's height
at line 336
static mixed
filter_flash_width(string $width, int $max_width, Logger $logger)
Filter a flash object's width
at line 358
static mixed
filter_font_size(string $size, int $max_size, Logger $logger)
Filter the value used in a [size] BBCode
at line 386
static string|bool
filter_img_url(string $url, array $url_config, Logger $logger)
Filter an image's URL to enforce restrictions on its dimensions
at line 404
protected bool
is_a_bbcode(Tag $tag)
Test whether given tag consumes text that looks like BBCode-styled markup