From bbda6a710849a46de98937e85e96ea06abe333fd Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 20 Jan 2015 23:53:59 +0100 Subject: Once class per file: framework/*.php; removed pradolite --- framework/TJavaScriptString.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 framework/TJavaScriptString.php (limited to 'framework/TJavaScriptString.php') diff --git a/framework/TJavaScriptString.php b/framework/TJavaScriptString.php new file mode 100644 index 00000000..11e76ec5 --- /dev/null +++ b/framework/TJavaScriptString.php @@ -0,0 +1,29 @@ + + * + * Global Events, intra-object events, Class behaviors, expanded behaviors + * @author Brad Anderson + * + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System + */ + +/** + * TJavaScriptString class is an internal class that marks strings that will be + * forcibly encoded when rendered inside a javascript block + * + * @package System + * @since 3.2.0 + */ +class TJavaScriptString extends TJavaScriptLiteral +{ + public function toJavaScriptLiteral() + { + return TJavaScript::jsonEncode((string)$this->_s,JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); + } +} \ No newline at end of file -- cgit v1.2.3