PHP Class LightnCandy\Expression

Exibir arquivo Open project: zordius/lightncandy Class Usage Examples

Public Methods

Method Description
analyze ( array\arraystring | integer> $context, arraystring | integer> $var ) : arrayboolean | array> Analyze an expression
arrayString ( array $list ) : string Get string presentation for an array
boolString ( integer $v ) : string return 'true' or 'false' string.
listString ( array $list ) : string Get string presentation for a string list
toString ( integer $levels, boolean $spvar, array $var ) : string get normalized handlebars expression for a variable

Method Details

analyze() public static method

Analyze an expression
public static analyze ( array\arraystring | integer> $context, arraystring | integer> $var ) : arrayboolean | array>
$context array\arraystring | integer>
$var arraystring | integer>
return arrayboolean | array>

arrayString() public static method

Get string presentation for an array
public static arrayString ( array $list ) : string
$list array
return string PHP array names string

boolString() public static method

return 'true' or 'false' string.
public static boolString ( integer $v ) : string
$v integer value
return string 'true' when the value larger then 0

listString() public static method

Get string presentation for a string list
public static listString ( array $list ) : string
$list array
return string PHP list string

toString() public static method

get normalized handlebars expression for a variable
public static toString ( integer $levels, boolean $spvar, array $var ) : string
$levels integer trace N levels top parent scope
$spvar boolean is the path start with @ or not
$var array
return string normalized expression for debug display