class EdgeCompiler implements EdgeCompilerInterface (View source)

The EdgeCompiler class.

This is a modified version of Laravel Blade engine.

Methods

string
compile(string $value)

compile

string
compileEchoDefaults(string $value)

Compile the default values for the echo statement.

directive(string $name, callable $handler)

Register a handler for custom directives.

array
getDirectives()

Get the list of custom directives.

setDirectives(array $directives)

Method to set property directives

parser(callable $handler)

parser

setParsers(callable[] $parsers)

Method to set property parsers

callable[]
getParsers()

getParsers

array
getRawTags()

Gets the raw tags used by the compiler.

void
setRawTags(string $openTag, string $closeTag)

Sets the raw tags used for the compiler.

void
setContentTags(string $openTag, string $closeTag, bool $escaped = false)

Sets the content tags used for the compiler.

void
setEscapedContentTags(string $openTag, string $closeTag)

Sets the escaped content tags used for the compiler.

string
getContentTags()

Gets the content tags used for the compiler.

string
getEscapedContentTags()

Gets the escaped content tags used for the compiler.

void
setEchoFormat(string $format)

Set the echo format to be used by the compiler.

Details

at line line 118
string compile(string $value)

compile

Parameters

string $value

Return Value

string

at line line 422
string compileEchoDefaults(string $value)

Compile the default values for the echo statement.

Parameters

string $value

Return Value

string

at line line 886
EdgeCompilerInterface directive(string $name, callable $handler)

Register a handler for custom directives.

Parameters

string $name
callable $handler

Return Value

EdgeCompilerInterface

at line line 898
array getDirectives()

Get the list of custom directives.

Return Value

array

at line line 910
EdgeCompiler setDirectives(array $directives)

Method to set property directives

Parameters

array $directives

Return Value

EdgeCompiler Return self to support chaining.

at line line 924
EdgeCompilerInterface parser(callable $handler)

parser

Parameters

callable $handler

Return Value

EdgeCompilerInterface

at line line 938
EdgeCompiler setParsers(callable[] $parsers)

Method to set property parsers

Parameters

callable[] $parsers

Return Value

EdgeCompiler Return self to support chaining.

at line line 950
callable[] getParsers()

getParsers

Return Value

callable[]

at line line 960
array getRawTags()

Gets the raw tags used by the compiler.

Return Value

array

at line line 973
void setRawTags(string $openTag, string $closeTag)

Sets the raw tags used for the compiler.

Parameters

string $openTag
string $closeTag

Return Value

void

at line line 987
void setContentTags(string $openTag, string $closeTag, bool $escaped = false)

Sets the content tags used for the compiler.

Parameters

string $openTag
string $closeTag
bool $escaped

Return Value

void

at line line 1002
void setEscapedContentTags(string $openTag, string $closeTag)

Sets the escaped content tags used for the compiler.

Parameters

string $openTag
string $closeTag

Return Value

void

at line line 1012
string getContentTags()

Gets the content tags used for the compiler.

Return Value

string

at line line 1022
string getEscapedContentTags()

Gets the escaped content tags used for the compiler.

Return Value

string

at line line 1048
void setEchoFormat(string $format)

Set the echo format to be used by the compiler.

Parameters

string $format

Return Value

void