PHP Class FOF30\View\Compiler\Blade

Inheritance: implements FOF30\View\Compiler\CompilerInterface
Afficher le fichier Open project: akeeba/fof

Protected Properties

Свойство Type Description
$compilers array All of the available compiler functions. Each one is called against every HTML block in the template.
$contentTags array Array of opening and closing tags for escaped echos.
$escapedTags array Array of opening and closing tags for escaped echos.
$extensions array All of the registered compiler extensions.
$footer array Array of footer lines to be added to template.
$forelseCounter integer Counter to keep track of nested forelse statements.
$isCacheable boolean Are the results of this engine cacheable?
$path string The file currently being compiled.

Méthodes publiques

Méthode Description
compile ( $path, array $forceParams = [] )
compileEchoDefaults ( string $value ) : string Compile the default values for the echo statement.
compileString ( string $value ) : string Compile the given Blade template contents.
createMatcher ( string $function ) : string Get the regular expression for a generic Blade function.
createOpenMatcher ( string $function ) : string Get the regular expression for a generic Blade function.
createPlainMatcher ( string $function ) : string Create a plain Blade matcher.
extend ( callable $compiler ) : void Register a custom Blade compiler.
getContentTags ( ) : string Gets the content tags used for the compiler.
getEscapedContentTags ( ) : string Gets the escaped content tags used for the compiler.
getPath ( ) : string Get the path currently being compiled.
isCacheable ( ) : mixed Are the results of this compiler engine cacheable? If the engine makes use of the forcedParams it must return false.
setContentTags ( string $openTag, string $closeTag, boolean $escaped = false ) : void Sets the content tags used for the compiler.
setEscapedContentTags ( string $openTag, string $closeTag ) : void Sets the escaped content tags used for the compiler.
setPath ( string $path ) : void Set the path currently being compiled.

Méthodes protégées

Méthode Description
compileAppend ( string $expression ) : string Compile the append statements into valid PHP.
compileComments ( string $value ) : string Compile Blade comments into valid PHP.
compileCss ( string $expression ) : string Compile the css statements into valid PHP.
compileEach ( string $expression ) : string Compile the each statements into valid PHP.
compileEchos ( string $value ) : string Compile Blade echos into valid PHP.
compileEditor ( string $expression ) : string Compile the editor statements 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 forelse statements into valid PHP.
compileEndRepeatable ( string $expression ) : string Compile the end endRepeatable statements into valid PHP.
compileEndfor ( string $expression ) : string Compile the end-for statements into valid PHP.
compileEndforeach ( string $expression ) : string Compile the end-for-each statements into valid PHP.
compileEndforelse ( string $expression ) : string Compile the end-for-else statements into valid PHP.
compileEndif ( string $expression ) : string Compile the end-if statements into valid PHP.
compileEndpush ( string $expression ) : string Compile the endpush statements into valid PHP.
compileEndsection ( string $expression ) : string Compile the end-section statements into valid PHP.
compileEndunless ( string $expression ) : string Compile the end unless statements into valid PHP.
compileEndwhile ( string $expression ) : string Compile the end-while statements into valid PHP.
compileEscapedEchos ( string $value ) : string Compile the escaped echo statements.
compileEscapedEchosCallback ( array $matches ) : string Callback for compileEscapedEchos, since $this is not allowed in Closures under PHP 5.3.
compileExtends ( string $expression ) : string Compile the extends statements into valid PHP.
compileExtensions ( string $value ) : string Execute the user defined extensions.
compileFor ( string $expression ) : string Compile the for statements into valid PHP.
compileForeach ( string $expression ) : string Compile the foreach statements into valid PHP.
compileForelse ( string $expression ) : string Compile the forelse 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.
compileInlineCss ( string $expression ) : string Compile the inlineCss statements into valid PHP.
compileInlineJs ( string $expression ) : string Compile the inlineJs statements into valid PHP.
compileJhtml ( string $expression ) : string Compile the jhtml statements into valid PHP.
compileJs ( string $expression ) : string Compile the js statements into valid PHP.
compileLang ( string $expression ) : string Compile the lang statements into valid PHP.
compileLess ( string $expression ) : string Compile the less statements into valid PHP.
compileMedia ( string $expression ) : string Compile the media statements into valid PHP.
compileModule ( string $expression ) : string Compile the module statements into valid PHP.
compileModules ( string $expression ) : string Compile the modules statements into valid PHP.
compileOverwrite ( string $expression ) : string Compile the overwrite statements into valid PHP.
compilePush ( string $expression ) : string Compile the push statements into valid PHP.
compileRegularEchos ( string $value ) : string Compile the "regular" echo statements.
compileRegularEchosCallback ( array $matches ) : string Callback for compileRegularEchos, since $this is not allowed in Closures under PHP 5.3.
compileRepeatable ( string $expression ) : string Compile the end repeatable statements into valid PHP.
compileRoute ( string $expression ) : string Compile the route statements into valid PHP.
compileSection ( string $expression ) : string Compile the section statements into valid PHP.
compileShow ( string $expression ) : string Compile the show statements into valid PHP.
compileSprintf ( string $expression ) : string Compile the sprintf 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 "@"
compileStatementsCallback ( $match ) : string Callback for compileStatements, since $this is not allowed in Closures under PHP 5.3.
compileStop ( string $expression ) : string Compile the stop statements into valid PHP.
compileToken ( string $expression ) : string Compile the token statements into valid PHP.
compileUnless ( string $expression ) : string Compile the unless statements into valid PHP.
compileWhile ( string $expression ) : string Compile the while statements into valid PHP.
compileYield ( string $expression ) : string Compile the yield statements into valid PHP.
compileYieldRepeatable ( string $expression ) : string Compile the end yieldRepeatable statements into valid PHP.
getTags ( boolean $escaped = false ) : array Gets the tags used for the compiler.
parseToken ( array $token ) : string Parse the tokens from the template.

Method Details

compile() public méthode

public compile ( $path, array $forceParams = [] )
$forceParams array

compileAppend() protected méthode

Compile the append statements into valid PHP.
protected compileAppend ( string $expression ) : string
$expression string
Résultat string

compileComments() protected méthode

Compile Blade comments into valid PHP.
protected compileComments ( string $value ) : string
$value string
Résultat string

compileCss() protected méthode

Compile the css statements into valid PHP.
protected compileCss ( string $expression ) : string
$expression string
Résultat string

compileEach() protected méthode

Compile the each statements into valid PHP.
protected compileEach ( string $expression ) : string
$expression string
Résultat string

compileEchoDefaults() public méthode

Compile the default values for the echo statement.
public compileEchoDefaults ( string $value ) : string
$value string
Résultat string

compileEchos() protected méthode

Compile Blade echos into valid PHP.
protected compileEchos ( string $value ) : string
$value string
Résultat string

compileEditor() protected méthode

Compile the editor statements into valid PHP.
protected compileEditor ( string $expression ) : string
$expression string
Résultat string

compileElse() protected méthode

Compile the else statements into valid PHP.
protected compileElse ( string $expression ) : string
$expression string
Résultat string

compileElseif() protected méthode

Compile the else-if statements into valid PHP.
protected compileElseif ( string $expression ) : string
$expression string
Résultat string

compileEmpty() protected méthode

Compile the forelse statements into valid PHP.
protected compileEmpty ( string $expression ) : string
$expression string
Résultat string

compileEndRepeatable() protected méthode

Compile the end endRepeatable statements into valid PHP.
protected compileEndRepeatable ( string $expression ) : string
$expression string
Résultat string

compileEndfor() protected méthode

Compile the end-for statements into valid PHP.
protected compileEndfor ( string $expression ) : string
$expression string
Résultat string

compileEndforeach() protected méthode

Compile the end-for-each statements into valid PHP.
protected compileEndforeach ( string $expression ) : string
$expression string
Résultat string

compileEndforelse() protected méthode

Compile the end-for-else statements into valid PHP.
protected compileEndforelse ( string $expression ) : string
$expression string
Résultat string

compileEndif() protected méthode

Compile the end-if statements into valid PHP.
protected compileEndif ( string $expression ) : string
$expression string
Résultat string

compileEndpush() protected méthode

Compile the endpush statements into valid PHP.
protected compileEndpush ( string $expression ) : string
$expression string
Résultat string

compileEndsection() protected méthode

Compile the end-section statements into valid PHP.
protected compileEndsection ( string $expression ) : string
$expression string
Résultat string

compileEndunless() protected méthode

Compile the end unless statements into valid PHP.
protected compileEndunless ( string $expression ) : string
$expression string
Résultat string

compileEndwhile() protected méthode

Compile the end-while statements into valid PHP.
protected compileEndwhile ( string $expression ) : string
$expression string
Résultat string

compileEscapedEchos() protected méthode

Compile the escaped echo statements.
protected compileEscapedEchos ( string $value ) : string
$value string
Résultat string

compileEscapedEchosCallback() protected méthode

Callback for compileEscapedEchos, since $this is not allowed in Closures under PHP 5.3.
protected compileEscapedEchosCallback ( array $matches ) : string
$matches array
Résultat string

compileExtends() protected méthode

Compile the extends statements into valid PHP.
protected compileExtends ( string $expression ) : string
$expression string
Résultat string

compileExtensions() protected méthode

Execute the user defined extensions.
protected compileExtensions ( string $value ) : string
$value string
Résultat string

compileFor() protected méthode

Compile the for statements into valid PHP.
protected compileFor ( string $expression ) : string
$expression string
Résultat string

compileForeach() protected méthode

Compile the foreach statements into valid PHP.
protected compileForeach ( string $expression ) : string
$expression string
Résultat string

compileForelse() protected méthode

Compile the forelse statements into valid PHP.
protected compileForelse ( string $expression ) : string
$expression string
Résultat string

compileIf() protected méthode

Compile the if statements into valid PHP.
protected compileIf ( string $expression ) : string
$expression string
Résultat string

compileInclude() protected méthode

Compile the include statements into valid PHP.
protected compileInclude ( string $expression ) : string
$expression string
Résultat string

compileInlineCss() protected méthode

Compile the inlineCss statements into valid PHP.
protected compileInlineCss ( string $expression ) : string
$expression string
Résultat string

compileInlineJs() protected méthode

Compile the inlineJs statements into valid PHP.
protected compileInlineJs ( string $expression ) : string
$expression string
Résultat string

compileJhtml() protected méthode

Compile the jhtml statements into valid PHP.
protected compileJhtml ( string $expression ) : string
$expression string
Résultat string

compileJs() protected méthode

Compile the js statements into valid PHP.
protected compileJs ( string $expression ) : string
$expression string
Résultat string

compileLang() protected méthode

Compile the lang statements into valid PHP.
protected compileLang ( string $expression ) : string
$expression string
Résultat string

compileLess() protected méthode

Compile the less statements into valid PHP.
protected compileLess ( string $expression ) : string
$expression string
Résultat string

compileMedia() protected méthode

Compile the media statements into valid PHP.
protected compileMedia ( string $expression ) : string
$expression string
Résultat string

compileModule() protected méthode

Compile the module statements into valid PHP.
protected compileModule ( string $expression ) : string
$expression string
Résultat string

compileModules() protected méthode

Compile the modules statements into valid PHP.
protected compileModules ( string $expression ) : string
$expression string
Résultat string

compileOverwrite() protected méthode

Compile the overwrite statements into valid PHP.
protected compileOverwrite ( string $expression ) : string
$expression string
Résultat string

compilePush() protected méthode

Compile the push statements into valid PHP.
protected compilePush ( string $expression ) : string
$expression string
Résultat string

compileRegularEchos() protected méthode

Compile the "regular" echo statements.
protected compileRegularEchos ( string $value ) : string
$value string
Résultat string

compileRegularEchosCallback() protected méthode

Callback for compileRegularEchos, since $this is not allowed in Closures under PHP 5.3.
protected compileRegularEchosCallback ( array $matches ) : string
$matches array
Résultat string

compileRepeatable() protected méthode

Compile the end repeatable statements into valid PHP.
protected compileRepeatable ( string $expression ) : string
$expression string
Résultat string

compileRoute() protected méthode

Compile the route statements into valid PHP.
protected compileRoute ( string $expression ) : string
$expression string
Résultat string

compileSection() protected méthode

Compile the section statements into valid PHP.
protected compileSection ( string $expression ) : string
$expression string
Résultat string

compileShow() protected méthode

Compile the show statements into valid PHP.
protected compileShow ( string $expression ) : string
$expression string
Résultat string

compileSprintf() protected méthode

Compile the sprintf statements into valid PHP.
protected compileSprintf ( string $expression ) : string
$expression string
Résultat string

compileStack() protected méthode

Compile the stack statements into the content
protected compileStack ( string $expression ) : string
$expression string
Résultat string

compileStatements() protected méthode

Compile Blade Statements that start with "@"
protected compileStatements ( string $value ) : mixed
$value string
Résultat mixed

compileStatementsCallback() protected méthode

Callback for compileStatements, since $this is not allowed in Closures under PHP 5.3.
protected compileStatementsCallback ( $match ) : string
$match
Résultat string

compileStop() protected méthode

Compile the stop statements into valid PHP.
protected compileStop ( string $expression ) : string
$expression string
Résultat string

compileString() public méthode

Compile the given Blade template contents.
public compileString ( string $value ) : string
$value string
Résultat string

compileToken() protected méthode

Compile the token statements into valid PHP.
protected compileToken ( string $expression ) : string
$expression string
Résultat string

compileUnless() protected méthode

Compile the unless statements into valid PHP.
protected compileUnless ( string $expression ) : string
$expression string
Résultat string

compileWhile() protected méthode

Compile the while statements into valid PHP.
protected compileWhile ( string $expression ) : string
$expression string
Résultat string

compileYield() protected méthode

Compile the yield statements into valid PHP.
protected compileYield ( string $expression ) : string
$expression string
Résultat string

compileYieldRepeatable() protected méthode

Compile the end yieldRepeatable statements into valid PHP.
protected compileYieldRepeatable ( string $expression ) : string
$expression string
Résultat string

createMatcher() public méthode

Get the regular expression for a generic Blade function.
public createMatcher ( string $function ) : string
$function string
Résultat string

createOpenMatcher() public méthode

Get the regular expression for a generic Blade function.
public createOpenMatcher ( string $function ) : string
$function string
Résultat string

createPlainMatcher() public méthode

Create a plain Blade matcher.
public createPlainMatcher ( string $function ) : string
$function string
Résultat string

extend() public méthode

Register a custom Blade compiler.
public extend ( callable $compiler ) : void
$compiler callable
Résultat void

getContentTags() public méthode

Gets the content tags used for the compiler.
public getContentTags ( ) : string
Résultat string

getEscapedContentTags() public méthode

Gets the escaped content tags used for the compiler.
public getEscapedContentTags ( ) : string
Résultat string

getPath() public méthode

Get the path currently being compiled.
public getPath ( ) : string
Résultat string

getTags() protected méthode

Gets the tags used for the compiler.
protected getTags ( boolean $escaped = false ) : array
$escaped boolean
Résultat array

isCacheable() public méthode

Are the results of this compiler engine cacheable? If the engine makes use of the forcedParams it must return false.
public isCacheable ( ) : mixed
Résultat mixed

parseToken() protected méthode

Parse the tokens from the template.
protected parseToken ( array $token ) : string
$token array
Résultat string

setContentTags() public méthode

Sets the content tags used for the compiler.
public setContentTags ( string $openTag, string $closeTag, boolean $escaped = false ) : void
$openTag string
$closeTag string
$escaped boolean
Résultat void

setEscapedContentTags() public méthode

Sets the escaped content tags used for the compiler.
public setEscapedContentTags ( string $openTag, string $closeTag ) : void
$openTag string
$closeTag string
Résultat void

setPath() public méthode

Set the path currently being compiled.
public setPath ( string $path ) : void
$path string
Résultat void

Property Details

$compilers protected_oe property

All of the available compiler functions. Each one is called against every HTML block in the template.
protected array $compilers
Résultat array

$contentTags protected_oe property

Array of opening and closing tags for escaped echos.
protected array $contentTags
Résultat array

$escapedTags protected_oe property

Array of opening and closing tags for escaped echos.
protected array $escapedTags
Résultat array

$extensions protected_oe property

All of the registered compiler extensions.
protected array $extensions
Résultat array

$forelseCounter protected_oe property

Counter to keep track of nested forelse statements.
protected int $forelseCounter
Résultat integer

$isCacheable protected_oe property

Are the results of this engine cacheable?
protected bool $isCacheable
Résultat boolean

$path protected_oe property

The file currently being compiled.
protected string $path
Résultat string