PHP Class Jade\Compiler

Show file Open project: kylekatarnls/jade-php Class Usage Examples

Protected Properties

Property Type Description
$buffer array
$filename string
$filters array
$jade Jade
$parentIndents
$quote string
$xml

Public Methods

Method Description
__construct ( array/Jade $options = [], array $filters = [], $filename = null )
compile ( $node ) : string
handleCode ( $input, string $name = '' ) : array
handleString ( $input ) : array
interpolate ( string $text ) : mixed
subCompiler ( ) : Compiler Get a compiler with the same settings.
wrapInPhp ( $code ) : string Return code wrapped in PHP tags.
wrapOutPhp ( $code ) : string Return code wrapped out of a PHP code.

Protected Methods

Method Description
apply ( $method, $arguments ) : mixed
buffer ( $line, null $indent = null )
closingTag ( ) : string php closing tag depanding on the pretty print setting.
createCode ( $code ) : string
createPhpBlock ( $code, null $statements = null ) : string
createStatements ( ) : array
handleArgumentValue ( $arg )
handleCodePhp ( $input, $name = '' )
interpolateFromCapture ( array $match ) : string
isConstant ( string $str ) : boolean | integer
renderPhpStatements ( $code, null $statements = null ) : string

Method Details

__construct() public method

public __construct ( array/Jade $options = [], array $filters = [], $filename = null )
$options array/Jade
$filters array

apply() protected method

protected apply ( $method, $arguments ) : mixed
$method
$arguments
return mixed

buffer() protected method

protected buffer ( $line, null $indent = null )
$line
$indent null

closingTag() protected method

php closing tag depanding on the pretty print setting.
protected closingTag ( ) : string
return string

compile() public method

public compile ( $node ) : string
$node
return string

createCode() protected method

protected createCode ( $code ) : string
$code
return string

createPhpBlock() protected method

protected createPhpBlock ( $code, null $statements = null ) : string
$code
$statements null
return string

createStatements() protected method

protected createStatements ( ) : array
return array

handleArgumentValue() protected method

protected handleArgumentValue ( $arg )

handleCode() public method

public handleCode ( $input, string $name = '' ) : array
$input
$name string
return array

handleCodePhp() protected method

protected handleCodePhp ( $input, $name = '' )

handleString() public method

public handleString ( $input ) : array
$input
return array

interpolate() public method

public interpolate ( string $text ) : mixed
$text string
return mixed

interpolateFromCapture() protected method

protected interpolateFromCapture ( array $match ) : string
$match array
return string

isConstant() protected method

protected isConstant ( string $str ) : boolean | integer
$str string
return boolean | integer

renderPhpStatements() protected method

protected renderPhpStatements ( $code, null $statements = null ) : string
$code
$statements null
return string

subCompiler() public method

Get a compiler with the same settings.
public subCompiler ( ) : Compiler
return Compiler

wrapInPhp() public method

Return code wrapped in PHP tags.
public wrapInPhp ( $code ) : string
return string

wrapOutPhp() public method

Return code wrapped out of a PHP code.
public wrapOutPhp ( $code ) : string
return string

Property Details

$buffer protected property

protected array $buffer
return array

$filename protected property

protected string $filename
return string

$filters protected property

protected array $filters
return array

$jade protected property

protected Jade,jade $jade
return Jade

$parentIndents protected property

protected $parentIndents

$quote protected property

protected string $quote
return string

$xml protected property

protected $xml