MediaWiki
1.34.0
|
A wrapper class which causes Xml::encodeJsVar() and Xml::encodeJsCall() to interpret a given string as being a JavaScript expression, instead of string data. More...
Public Member Functions | |
__construct ( $value) | |
Static Public Member Functions | |
static | encodeObject ( $obj, $pretty=false) |
Encode an object containing XmlJsCode objects. More... | |
Public Attributes | |
$value | |
A wrapper class which causes Xml::encodeJsVar() and Xml::encodeJsCall() to interpret a given string as being a JavaScript expression, instead of string data.
This returns "a + b".
Definition at line 40 of file XmlJsCode.php.
XmlJsCode::__construct | ( | $value | ) |
Definition at line 43 of file XmlJsCode.php.
|
static |
Encode an object containing XmlJsCode objects.
This takes an object or associative array where (some of) the values are XmlJsCode objects, and re-encodes it as a single XmlJsCode object.
object | array | $obj | Object or associative array to encode |
bool | $pretty | If true, add non-significant whitespace to improve readability. |
Definition at line 58 of file XmlJsCode.php.
References $value, and Xml\encodeJsVar().
XmlJsCode::$value |
Definition at line 41 of file XmlJsCode.php.
Referenced by __construct(), and encodeObject().