Encoder
in package
LightnCandy class to encode.
Table of Contents
- enc() : string
- Get html encoded string
- encq() : string
- LightnCandy runtime method for {{var}} , and deal with single quote to same as handlebars.js .
- raw() : array<string|int, array|string|int>|string|int|null
- Get string value
Methods
enc()
Get html encoded string
public
static enc(array<string, array|string|int> $cx, array<string|int, array|string|int>|string|int|null $var) : string
Parameters
- $cx : array<string, array|string|int>
-
render time context
- $var : array<string|int, array|string|int>|string|int|null
-
value to be htmlencoded
Tags
Return values
string —The htmlencoded value of the specified variable
encq()
LightnCandy runtime method for {{var}} , and deal with single quote to same as handlebars.js .
public
static encq(array<string, array|string|int> $cx, array<string|int, array|string|int>|string|int|null $var) : string
Parameters
- $cx : array<string, array|string|int>
-
render time context
- $var : array<string|int, array|string|int>|string|int|null
-
value to be htmlencoded
Tags
Return values
string —The htmlencoded value of the specified variable
raw()
Get string value
public
static raw(array<string, array|string|int> $cx, array<string|int, array|string|int>|string|int|null $v, int $ex) : array<string|int, array|string|int>|string|int|null
Parameters
- $cx : array<string, array|string|int>
-
render time context
- $v : array<string|int, array|string|int>|string|int|null
-
value to be output
- $ex : int
-
1 to return untouched value, default is 0
Tags
Return values
array<string|int, array|string|int>|string|int|null —The raw value of the specified variable