PHP Class Jade\Compiler

Afficher le fichier Open project: kylekatarnls/jade-php Class Usage Examples

Protected Properties

Свойство Type Description
$buffer array
$filename string
$filters array
$jade Jade
$parentIndents
$quote string
$xml

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

apply() protected méthode

protected apply ( $method, $arguments ) : mixed
$method
$arguments
Résultat mixed

buffer() protected méthode

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

closingTag() protected méthode

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

compile() public méthode

public compile ( $node ) : string
$node
Résultat string

createCode() protected méthode

protected createCode ( $code ) : string
$code
Résultat string

createPhpBlock() protected méthode

protected createPhpBlock ( $code, null $statements = null ) : string
$code
$statements null
Résultat string

createStatements() protected méthode

protected createStatements ( ) : array
Résultat array

handleArgumentValue() protected méthode

protected handleArgumentValue ( $arg )

handleCode() public méthode

public handleCode ( $input, string $name = '' ) : array
$input
$name string
Résultat array

handleCodePhp() protected méthode

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

handleString() public méthode

public handleString ( $input ) : array
$input
Résultat array

interpolate() public méthode

public interpolate ( string $text ) : mixed
$text string
Résultat mixed

interpolateFromCapture() protected méthode

protected interpolateFromCapture ( array $match ) : string
$match array
Résultat string

isConstant() protected méthode

protected isConstant ( string $str ) : boolean | integer
$str string
Résultat boolean | integer

renderPhpStatements() protected méthode

protected renderPhpStatements ( $code, null $statements = null ) : string
$code
$statements null
Résultat string

subCompiler() public méthode

Get a compiler with the same settings.
public subCompiler ( ) : Compiler
Résultat Compiler

wrapInPhp() public méthode

Return code wrapped in PHP tags.
public wrapInPhp ( $code ) : string
Résultat string

wrapOutPhp() public méthode

Return code wrapped out of a PHP code.
public wrapOutPhp ( $code ) : string
Résultat string

Property Details

$buffer protected_oe property

protected array $buffer
Résultat array

$filename protected_oe property

protected string $filename
Résultat string

$filters protected_oe property

protected array $filters
Résultat array

$jade protected_oe property

protected Jade,jade $jade
Résultat Jade

$parentIndents protected_oe property

protected $parentIndents

$quote protected_oe property

protected string $quote
Résultat string

$xml protected_oe property

protected $xml