PHP Class Prado\Web\Javascripts\TJavaScriptLiteral

Since Prado 3.2 all the data that gets sent clientside inside a javascript statement is encoded by default to avoid any kind of injection. Sometimes there's the need to bypass this encoding and send raw javascript code. To ensure that a string doesn't get encoded by {@link TJavaScript::encode()}, construct a new TJavaScriptLiteral: a javascript test string $js="alert('hello')"; the string in $raw will not be encoded when sent clientside inside a javascript block $raw=new TJavaScriptLiteral($js); shortened form $raw=_js($js);
Since: 3.2.0
Afficher le fichier Open project: pradosoft/prado

Protected Properties

Свойство Type Description
$_s

Méthodes publiques

Méthode Description
__construct ( $s )
__toString ( )
toJavaScriptLiteral ( )

Method Details

__construct() public méthode

public __construct ( $s )

__toString() public méthode

public __toString ( )

toJavaScriptLiteral() public méthode

public toJavaScriptLiteral ( )

Property Details

$_s protected_oe property

protected $_s