PHP Class Laravel\Envoy\Compiler

Show file Open project: laravel/envoy Class Usage Examples

Protected Properties

Property Type Description
$compilers array All of the available compiler functions.
$contentTags array Array of opening and closing tags for echos.
$serverCompilers array All of the available compiler functions.

Public Methods

Method Description
compile ( string $value, boolean $serversOnly = false ) : string Compile the given Envoy template contents.
compileEchoDefaults ( string $value ) : string Compile the default values for the echo statement.
compileInclude ( string $value ) : string Compile an @include into a PHP include statement.
compileSetupStart ( string $value ) : string Compile setup section begin statement into PHP start tag.
compileSetupStop ( string $value ) : string Compile setup section stop statement into PHP end tag.
createMatcher ( string $function ) : string Get the regular expression for a generic Envoy function.
createOpenMatcher ( string $function ) : string Get the regular expression for a generic Envoy function.
createPlainMatcher ( string $function ) : string Create a plain Envoy matcher.

Protected Methods

Method Description
compileAfter ( string $value ) : string Compile Envoy after statements into valid PHP.
compileAfterStop ( string $value ) : string Compile Envoy after stop statements into valid PHP.
compileClosings ( string $value ) : string Compile Envoy structure closings into valid PHP.
compileComments ( string $value ) : string Compile Envoy comments into valid PHP.
compileEchos ( string $value ) : string Compile Envoy echos into valid PHP.
compileElse ( string $value ) : string Compile Envoy else statements into valid PHP.
compileEndUnless ( string $value ) : string Compile Envoy end unless statements into valid PHP.
compileError ( string $value ) : string Compile Envoy error statements into valid PHP.
compileErrorStop ( string $value ) : string Compile Envoy error stop statements into valid PHP.
compileFinished ( string $value ) : string Compile Envoy finished statements into valid PHP.
compileFinishedStop ( string $value ) : string Compile Envoy finished stop statements into valid PHP.
compileHipchat ( string $value ) : string Compile Envoy HipChat statements into valid PHP.
compileImports ( string $value ) : string Compile Envoy imports into valid PHP.
compileMacroStart ( string $value ) : string Compile Envoy macro start statements into valid PHP.
compileMacroStop ( string $value ) : string Compile Envoy macro stop statements into valid PHP.
compileOpenings ( string $value ) : string Compile Envoy structure openings into valid PHP.
compileRegularEchos ( string $value ) : string Compile the "regular" echo statements.
compileServers ( string $value ) : string Compile Envoy server statements into valid PHP.
compileSets ( string $value ) : string Compile Envoy sets into valid PHP.
compileSlack ( string $value ) : string Compile Envoy Slack statements into valid PHP.
compileTaskStart ( string $value ) : string Compile Envoy task start statements into valid PHP.
compileTaskStop ( string $value ) : string Compile Envoy task stop statements into valid PHP.
compileUnless ( string $value ) : string Compile Envoy unless statements into valid PHP.

Private Methods

Method Description
initializeVariables ( string $value ) : string Initialize the variables included in the Envoy template.

Method Details

compile() public method

Compile the given Envoy template contents.
public compile ( string $value, boolean $serversOnly = false ) : string
$value string
$serversOnly boolean
return string

compileAfter() protected method

Compile Envoy after statements into valid PHP.
protected compileAfter ( string $value ) : string
$value string
return string

compileAfterStop() protected method

Compile Envoy after stop statements into valid PHP.
protected compileAfterStop ( string $value ) : string
$value string
return string

compileClosings() protected method

Compile Envoy structure closings into valid PHP.
protected compileClosings ( string $value ) : string
$value string
return string

compileComments() protected method

Compile Envoy comments into valid PHP.
protected compileComments ( string $value ) : string
$value string
return string

compileEchoDefaults() public method

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

compileEchos() protected method

Compile Envoy echos into valid PHP.
protected compileEchos ( string $value ) : string
$value string
return string

compileElse() protected method

Compile Envoy else statements into valid PHP.
protected compileElse ( string $value ) : string
$value string
return string

compileEndUnless() protected method

Compile Envoy end unless statements into valid PHP.
protected compileEndUnless ( string $value ) : string
$value string
return string

compileError() protected method

Compile Envoy error statements into valid PHP.
protected compileError ( string $value ) : string
$value string
return string

compileErrorStop() protected method

Compile Envoy error stop statements into valid PHP.
protected compileErrorStop ( string $value ) : string
$value string
return string

compileFinished() protected method

Compile Envoy finished statements into valid PHP.
protected compileFinished ( string $value ) : string
$value string
return string

compileFinishedStop() protected method

Compile Envoy finished stop statements into valid PHP.
protected compileFinishedStop ( string $value ) : string
$value string
return string

compileHipchat() protected method

Compile Envoy HipChat statements into valid PHP.
protected compileHipchat ( string $value ) : string
$value string
return string

compileImports() protected method

Compile Envoy imports into valid PHP.
protected compileImports ( string $value ) : string
$value string
return string

compileInclude() public method

Compile an @include into a PHP include statement.
public compileInclude ( string $value ) : string
$value string
return string

compileMacroStart() protected method

Compile Envoy macro start statements into valid PHP.
protected compileMacroStart ( string $value ) : string
$value string
return string

compileMacroStop() protected method

Compile Envoy macro stop statements into valid PHP.
protected compileMacroStop ( string $value ) : string
$value string
return string

compileOpenings() protected method

Compile Envoy structure openings into valid PHP.
protected compileOpenings ( string $value ) : string
$value string
return string

compileRegularEchos() protected method

Compile the "regular" echo statements.
protected compileRegularEchos ( string $value ) : string
$value string
return string

compileServers() protected method

Compile Envoy server statements into valid PHP.
protected compileServers ( string $value ) : string
$value string
return string

compileSets() protected method

Compile Envoy sets into valid PHP.
protected compileSets ( string $value ) : string
$value string
return string

compileSetupStart() public method

Compile setup section begin statement into PHP start tag.
public compileSetupStart ( string $value ) : string
$value string
return string

compileSetupStop() public method

Compile setup section stop statement into PHP end tag.
public compileSetupStop ( string $value ) : string
$value string
return string

compileSlack() protected method

Compile Envoy Slack statements into valid PHP.
protected compileSlack ( string $value ) : string
$value string
return string

compileTaskStart() protected method

Compile Envoy task start statements into valid PHP.
protected compileTaskStart ( string $value ) : string
$value string
return string

compileTaskStop() protected method

Compile Envoy task stop statements into valid PHP.
protected compileTaskStop ( string $value ) : string
$value string
return string

compileUnless() protected method

Compile Envoy unless statements into valid PHP.
protected compileUnless ( string $value ) : string
$value string
return string

createMatcher() public method

Get the regular expression for a generic Envoy function.
public createMatcher ( string $function ) : string
$function string
return string

createOpenMatcher() public method

Get the regular expression for a generic Envoy function.
public createOpenMatcher ( string $function ) : string
$function string
return string

createPlainMatcher() public method

Create a plain Envoy matcher.
public createPlainMatcher ( string $function ) : string
$function string
return string

Property Details

$compilers protected property

All of the available compiler functions.
protected array $compilers
return array

$contentTags protected property

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

$serverCompilers protected property

All of the available compiler functions.
protected array $serverCompilers
return array