Class TJavaScript
TJavaScript class.
TJavaScript is a utility class containing commonly-used javascript-related functions.
Package: System\Web\Javascripts
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo<weizhuo[at]gmail[dot]com>
Since: 3.0
Located at Web/Javascripts/TJavaScript.php
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo<weizhuo[at]gmail[dot]com>
Since: 3.0
Located at Web/Javascripts/TJavaScript.php
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
|
public static
string
|
#
quoteString( string $js )
Quotes a javascript string. After processing, the string is safely enclosed within a pair of quotation marks and can serve as a javascript string. |
public static
Marks
|
|
public static
|
|
public static
boolean
|
|
public static
|
|
public static
string
|
#
encode( mixed $value, boolean $toMap = true, boolean $encodeEmptyStrings = false )
Encodes a PHP variable into javascript representation. |
public static
string
|
#
jsonEncode( mixed $value, mixed $options = 0 )
Encodes a PHP variable into javascript string. This method invokes json_encode to perform the encoding. |
public static
mixed
|
#
jsonDecode( string $value, boolean $assoc = false, integer $depth = 512 )
Decodes a javascript string into PHP variable. This method invokes json_decode to perform the decoding. |
public static
minimized
|
#
JSMin( string $code )
Minimize the size of a javascript script. This method is based on Douglas Crockford's JSMin. |