Summary
- File
- Package hierarchy Formatting\parser
- Class hierarchy \AbstractParser \BBCodeHighlighter
This class is a highlighter for the PHPBoost BBCode language.
It supplies the highlighted code written in XHTML.
This class is a highlighter for the PHPBoost BBCode language.
It supplies the highlighted code written in XHTML.
__construct()
Builds a BBCodeHighlighter objet
None found |
get_content() : string
Returns the content of the parser. If you called a method which parses the content, this content will be parsed.
The content of the parser.
None found |
set_content(string $content)
Sets the content of the parser. When you will call a parse method, it will deal with this content.
string | $content | Content |
None found |
set_path_to_root(string $path)
Sets the reference path for relative URL
string | $path | Path |
None found |
get_path_to_root() : string
Returns the path to root attribute.
The path
None found |
set_page_path(string $page_path)
Sets the page path
string | $page_path | Page path |
None found |
get_page_path() : string
Returns the page path
path
None found |
add_module_special_tag( $pattern, $replacement)
{@inheritdoc}
$pattern | ||
$replacement |
None found |
get_module_special_tags()
{@inheritdoc}
None found |
parse(boolean $inline_code = self::BBCODE_HIGHLIGHTER_BLOCK_CODE) : void
Highlights the content of the parser.
boolean | $inline_code | If you want that the code make a new HTML paragraph, use BBCODE_HIGHLIGHTER_BLOCK_CODE (default parameter) and if you want that it would be integrated in a line, use BBCODE_HIGHLIGHTER_INLINE_CODE |
None found |
_parse_imbricated(string $match, string $regex, string $replace)
Parses a nested tag
string | $match | The regular expression which matches the tag to replace |
string | $regex | The regular expression which matches the replacement |
string | $replace | The replacement syntax. |
None found |
parse_tag_args(string $matches, string $allowed_args = array())
Parses tag args to get allowed ones
string | $matches | The regular expression which matches the tag args |
string | $allowed_args | The args that are allowed to be present |
None found |
highlight_bbcode_tag_with_many_parameters(array<mixed,string> $matches) : string
Callback which highlights the parameters of a complex tag
array<mixed,string> | $matches | elements matched by the regular expression |
The complex tag highlighted
None found |
$content : string
None found |
$array_tags : array<mixed,string>
None found |
$path_to_root : string
None found |
$page_path : string
None found |
$module_special_tags : array<mixed,string>
None found |
$bbcode_tag_color : string
None found |
$bbcode_param_color : string
None found |
$bbcode_param_name_color : string
None found |
$bbcode_list_item_color : string
None found |
PICK_UP = true
None found |
REIMPLANT = false
None found |
BBCODE_HIGHLIGHTER_INLINE_CODE = true
None found |
BBCODE_HIGHLIGHTER_BLOCK_CODE = false
None found |