CJavaScriptExpression represents a JavaScript expression that does not need escaping.
It can be passed to CJavaScript::encode() and the code will stay as is.
public function __construct($code) { if(!is_string($code)) throw new CException('Value passed to CJavaScriptExpression should be a string.'); if(strpos($code, 'js:')===0) $code=substr($code,3); $this->code=$code; }
Be the first person to leave a comment
Please login to leave your comment.