CliHighlighter
in package
implements
Highlighter
Interfaces, Classes, Traits and Enums
Table of Contents
- HIGHLIGHT_FUNCTIONS = 'functions'
- $escapeSequences : array<string, string>
- __construct() : mixed
- highlightError() : string
- Highlights a token which causes an issue
- highlightErrorMessage() : string
- Highlights an error message
- highlightToken() : string
- Highlights a token depending on its type.
- output() : string
- Helper function for building string output
- prefix() : string|null
Constants
HIGHLIGHT_FUNCTIONS
public
mixed
HIGHLIGHT_FUNCTIONS
= 'functions'
Properties
$escapeSequences
private
array<string, string>
$escapeSequences
Methods
__construct()
public
__construct([array<string, string> $escapeSequences = [] ]) : mixed
Parameters
- $escapeSequences : array<string, string> = []
Return values
mixed —highlightError()
Highlights a token which causes an issue
public
highlightError(string $value) : string
Parameters
- $value : string
Return values
string —highlightErrorMessage()
Highlights an error message
public
highlightErrorMessage(string $value) : string
Parameters
- $value : string
Return values
string —highlightToken()
Highlights a token depending on its type.
public
highlightToken(int $type, string $value) : string
Parameters
- $type : int
- $value : string
Return values
string —output()
Helper function for building string output
public
output(string $string) : string
Parameters
- $string : string
-
The string to be quoted
Return values
string —The quoted string
prefix()
private
prefix(int $type) : string|null
Parameters
- $type : int