PHP Class ManaPHP\Renderer\Engine\Sword\Compiler

Inheritance: extends ManaPHP\Component
Datei anzeigen Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_directives array This was implemented as a more usable "extend" in 5.1.
$_escapedTags array Array of opening and closing tags for escaped echos.
$_forElseCounter integer Counter to keep track of nested forElse statements.
$_rawTags array Array of opening and closing tags for raw echos.

Public Methods

Method Description
compileString ( string $value ) : string Compile the given Blade template contents.
directive ( string $name, callable $handler ) : static Register a handler for custom directives.

Protected Methods

Method Description
_compileAllow ( string $expression ) : string Compile the allow statements into valid PHP.
_compileAppend ( string $expression ) : string Compile the append statements into valid PHP.
_compileAsset ( string $expression ) : string Compile the Asset statements into valid PHP.
_compileBreak ( string $expression ) : string Compile the break statements into valid PHP.
_compileCan ( string $expression ) : string Compile the can statements into valid PHP.
_compileCannot ( string $expression ) : string Compile the cannot statements into valid PHP.
_compileComments ( string $value ) : string Compile Blade comments into valid PHP.
_compileContent ( string $expression ) : string Compile the break statements into valid PHP.
_compileContinue ( string $expression ) : string Compile the break statements into valid PHP.
_compileCsrfToken ( string $expression ) : string Compile the json statements into valid PHP.
_compileDebugger ( string $expression ) : string Compile the json statements into valid PHP.
_compileEchos ( string $value ) : string Compile Blade echos into valid PHP.
_compileElse ( string $expression ) : string Compile the else statements into valid PHP.
_compileElseIf ( string $expression ) : string Compile the else-if statements into valid PHP.
_compileEmpty ( string $expression ) : string Compile the empty statements into valid PHP.
_compileEndCan ( string $expression ) : string Compile the end-can statements into valid PHP.
_compileEndCannot ( string $expression ) : string Compile the end-cannot statements into valid PHP.
_compileEndFor ( string $expression ) : string Compile the end-for statements into valid PHP.
_compileEndForElse ( string $expression ) : string Compile the end-for-else statements into valid PHP.
_compileEndForeach ( string $expression ) : string Compile the end-for-each statements into valid PHP.
_compileEndIf ( string $expression ) : string Compile the end-if statements into valid PHP.
_compileEndPhp ( string $expression ) : string Compile the break statements into valid PHP.
_compileEndPush ( string $expression ) : string Compile the end push statements into valid PHP.
_compileEndSection ( string $expression ) : string Compile the end-section statements into valid PHP.
_compileEndWhile ( string $expression ) : string Compile the end-while statements into valid PHP.
_compileEol ( string $expression ) : string Compile the eol statements into valid PHP.
_compileEscapedEchos ( string $value ) : string Compile the escaped echo statements.
_compileFlash ( string $expression ) : string Compile the Asset statements into valid PHP.
_compileFor ( string $expression ) : string Compile the for statements into valid PHP.
_compileForElse ( string $expression ) : string Compile the for else statements into valid PHP.
_compileForeach ( string $expression ) : string Compile the foreach statements into valid PHP.
_compileIf ( string $expression ) : string Compile the if statements into valid PHP.
_compileInclude ( string $expression ) : string Compile the include statements into valid PHP.
_compileJson ( string $expression ) : string Compile the json statements into valid PHP.
_compileLayout ( string $expression ) : string Compile the break statements into valid PHP.
_compileOverwrite ( string $expression ) : string Compile the overwrite statements into valid PHP.
_compilePagination ( string $expression ) : string Compile the json statements into valid PHP.
_compilePartial ( string $expression ) : string Compile the partial statements into valid PHP.
_compilePhp ( string $expression ) : string Compile the break statements into valid PHP.
_compilePush ( string $expression ) : string Compile the push statements into valid PHP.
_compileRawEchos ( string $value ) : string Compile the "raw" echo statements.
_compileSection ( string $expression ) : string Compile the section statements into valid PHP.
_compileStack ( string $expression ) : string Compile the stack statements into the content.
_compileStatements ( string $value ) : mixed Compile Blade statements that start with "@".
_compileStop ( string $expression ) : string Compile the stop statements into valid PHP.
_compileTranslate ( string $expression ) : string Compile the json statements into valid PHP.
_compileUrl ( string $expression ) : string Compile the Url statements into valid PHP.
_compileWhile ( string $expression ) : string Compile the while statements into valid PHP.
_compileWidget ( string $expression ) : string Compile the widget statements into valid PHP.
_compileYield ( string $expression ) : string Compile the yield statements into valid PHP.
_getEchoMethods ( ) : array Get the echo methods in the proper order for compilation.

Private Methods

Method Description
_compileEchoDefaults ( string $value ) : string Compile the default values for the echo statement.

Method Details

_compileAllow() protected method

Compile the allow statements into valid PHP.
protected _compileAllow ( string $expression ) : string
$expression string
return string

_compileAppend() protected method

Compile the append statements into valid PHP.
protected _compileAppend ( string $expression ) : string
$expression string
return string

_compileAsset() protected method

Compile the Asset statements into valid PHP.
protected _compileAsset ( string $expression ) : string
$expression string
return string

_compileBreak() protected method

Compile the break statements into valid PHP.
protected _compileBreak ( string $expression ) : string
$expression string
return string

_compileCan() protected method

Compile the can statements into valid PHP.
protected _compileCan ( string $expression ) : string
$expression string
return string

_compileCannot() protected method

Compile the cannot statements into valid PHP.
protected _compileCannot ( string $expression ) : string
$expression string
return string

_compileComments() protected method

Compile Blade comments into valid PHP.
protected _compileComments ( string $value ) : string
$value string
return string

_compileContent() protected method

Compile the break statements into valid PHP.
protected _compileContent ( string $expression ) : string
$expression string
return string

_compileContinue() protected method

Compile the break statements into valid PHP.
protected _compileContinue ( string $expression ) : string
$expression string
return string

_compileCsrfToken() protected method

Compile the json statements into valid PHP.
protected _compileCsrfToken ( string $expression ) : string
$expression string
return string

_compileDebugger() protected method

Compile the json statements into valid PHP.
protected _compileDebugger ( string $expression ) : string
$expression string
return string

_compileEchos() protected method

Compile Blade echos into valid PHP.
protected _compileEchos ( string $value ) : string
$value string
return string

_compileElse() protected method

Compile the else statements into valid PHP.
protected _compileElse ( string $expression ) : string
$expression string
return string

_compileElseIf() protected method

Compile the else-if statements into valid PHP.
protected _compileElseIf ( string $expression ) : string
$expression string
return string

_compileEmpty() protected method

Compile the empty statements into valid PHP.
protected _compileEmpty ( string $expression ) : string
$expression string
return string

_compileEndCan() protected method

Compile the end-can statements into valid PHP.
protected _compileEndCan ( string $expression ) : string
$expression string
return string

_compileEndCannot() protected method

Compile the end-cannot statements into valid PHP.
protected _compileEndCannot ( string $expression ) : string
$expression string
return string

_compileEndFor() protected method

Compile the end-for statements into valid PHP.
protected _compileEndFor ( string $expression ) : string
$expression string
return string

_compileEndForElse() protected method

Compile the end-for-else statements into valid PHP.
protected _compileEndForElse ( string $expression ) : string
$expression string
return string

_compileEndForeach() protected method

Compile the end-for-each statements into valid PHP.
protected _compileEndForeach ( string $expression ) : string
$expression string
return string

_compileEndIf() protected method

Compile the end-if statements into valid PHP.
protected _compileEndIf ( string $expression ) : string
$expression string
return string

_compileEndPhp() protected method

Compile the break statements into valid PHP.
protected _compileEndPhp ( string $expression ) : string
$expression string
return string

_compileEndPush() protected method

Compile the end push statements into valid PHP.
protected _compileEndPush ( string $expression ) : string
$expression string
return string

_compileEndSection() protected method

Compile the end-section statements into valid PHP.
protected _compileEndSection ( string $expression ) : string
$expression string
return string

_compileEndWhile() protected method

Compile the end-while statements into valid PHP.
protected _compileEndWhile ( string $expression ) : string
$expression string
return string

_compileEol() protected method

Compile the eol statements into valid PHP.
protected _compileEol ( string $expression ) : string
$expression string
return string

_compileEscapedEchos() protected method

Compile the escaped echo statements.
protected _compileEscapedEchos ( string $value ) : string
$value string
return string

_compileFlash() protected method

Compile the Asset statements into valid PHP.
protected _compileFlash ( string $expression ) : string
$expression string
return string

_compileFor() protected method

Compile the for statements into valid PHP.
protected _compileFor ( string $expression ) : string
$expression string
return string

_compileForElse() protected method

Compile the for else statements into valid PHP.
protected _compileForElse ( string $expression ) : string
$expression string
return string

_compileForeach() protected method

Compile the foreach statements into valid PHP.
protected _compileForeach ( string $expression ) : string
$expression string
return string

_compileIf() protected method

Compile the if statements into valid PHP.
protected _compileIf ( string $expression ) : string
$expression string
return string

_compileInclude() protected method

Compile the include statements into valid PHP.
protected _compileInclude ( string $expression ) : string
$expression string
return string

_compileJson() protected method

Compile the json statements into valid PHP.
protected _compileJson ( string $expression ) : string
$expression string
return string

_compileLayout() protected method

Compile the break statements into valid PHP.
protected _compileLayout ( string $expression ) : string
$expression string
return string

_compileOverwrite() protected method

Compile the overwrite statements into valid PHP.
protected _compileOverwrite ( string $expression ) : string
$expression string
return string

_compilePagination() protected method

Compile the json statements into valid PHP.
protected _compilePagination ( string $expression ) : string
$expression string
return string

_compilePartial() protected method

Compile the partial statements into valid PHP.
protected _compilePartial ( string $expression ) : string
$expression string
return string

_compilePhp() protected method

Compile the break statements into valid PHP.
protected _compilePhp ( string $expression ) : string
$expression string
return string

_compilePush() protected method

Compile the push statements into valid PHP.
protected _compilePush ( string $expression ) : string
$expression string
return string

_compileRawEchos() protected method

Compile the "raw" echo statements.
protected _compileRawEchos ( string $value ) : string
$value string
return string

_compileSection() protected method

Compile the section statements into valid PHP.
protected _compileSection ( string $expression ) : string
$expression string
return string

_compileStack() protected method

Compile the stack statements into the content.
protected _compileStack ( string $expression ) : string
$expression string
return string

_compileStatements() protected method

Compile Blade statements that start with "@".
protected _compileStatements ( string $value ) : mixed
$value string
return mixed

_compileStop() protected method

Compile the stop statements into valid PHP.
protected _compileStop ( string $expression ) : string
$expression string
return string

_compileTranslate() protected method

Compile the json statements into valid PHP.
protected _compileTranslate ( string $expression ) : string
$expression string
return string

_compileUrl() protected method

Compile the Url statements into valid PHP.
protected _compileUrl ( string $expression ) : string
$expression string
return string

_compileWhile() protected method

Compile the while statements into valid PHP.
protected _compileWhile ( string $expression ) : string
$expression string
return string

_compileWidget() protected method

Compile the widget statements into valid PHP.
protected _compileWidget ( string $expression ) : string
$expression string
return string

_compileYield() protected method

Compile the yield statements into valid PHP.
protected _compileYield ( string $expression ) : string
$expression string
return string

_getEchoMethods() protected method

Get the echo methods in the proper order for compilation.
protected _getEchoMethods ( ) : array
return array

compileString() public method

Compile the given Blade template contents.
public compileString ( string $value ) : string
$value string
return string

directive() public method

Register a handler for custom directives.
public directive ( string $name, callable $handler ) : static
$name string
$handler callable
return static

Property Details

$_directives protected_oe property

This was implemented as a more usable "extend" in 5.1.
protected array $_directives
return array

$_escapedTags protected_oe property

Array of opening and closing tags for escaped echos.
protected array $_escapedTags
return array

$_forElseCounter protected_oe property

Counter to keep track of nested forElse statements.
protected int $_forElseCounter
return integer

$_rawTags protected_oe property

Array of opening and closing tags for raw echos.
protected array $_rawTags
return array