Summary
- File
- Package hierarchy Formatting\parser
- Class hierarchy \AbstractParser \TemplateHighlighter
This is a syntax highlighter for the PHPBoost template syntax.
This is a syntax highlighter for the PHPBoost template syntax.
__construct()
Build a TemplateHighlighter object.
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(integer $line_number = GESHI_NO_LINE_NUMBERS, boolean $inline_code = false)
Highlights the code. It uses the geshi HTML syntax highlighter and then it highlights the specific template syntax.
integer | $line_number | GESHI_NO_LINE_NUMBERS => no line numbers, GESHI_NORMAL_LINE_NUMBERS line numbers. |
boolean | $inline_code | true if it's a sigle line code, otherwise false. |
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 |
$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 |
PICK_UP = true
None found |
REIMPLANT = false
None found |
TPL_BRACES_STYLE = 'color:#7F3300;'
None found |
TPL_VARIABLE_STYLE = 'color:#FF6600; font-weight: bold;'
None found |
TPL_NESTED_VARIABLE_STYLE = 'color:#8F5211;'
None found |
TPL_SHARP_STYLE = 'color:#9915AF; font-weight: bold;'
None found |
TPL_KEYWORD_STYLE = 'color:#000066; font-weight: bold;'
None found |