Ubiquity
2.0.3
php rapid development framework
JsCode.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\js
;
4
10
class
JsCode
{
11
private
$code
;
12
16
private
static
function
addScript
(
$code
) {
17
return
preg_filter(
"/(<script[^>]*?>)?(.*)(<\/script>)?/si"
,
"<script>$2 </script>\n"
,
$code
, 1);
18
}
19
20
public
function
__construct
(
$code
) {
21
$this->code=
$code
;
22
}
23
24
public
function
__toString
() {
25
return
$this->
addScript
($this->code);
26
}
27
28
public
function
getCode
() {
29
return
$this->code
;
30
}
31
32
public
function
setCode
(
$code
) {
33
$this->code=
$code
;
34
return
$this;
35
}
36
}
Ubiquity\js\JsCode\addScript
static addScript($code)
Ajoute les balises de Script avant et après le code si nécessaire.
Definition:
JsCode.php:16
Ubiquity\js\JsCode\$code
$code
Definition:
JsCode.php:11
Ubiquity\js\JsCode\setCode
setCode($code)
Definition:
JsCode.php:32
Ubiquity\js\JsCode\__toString
__toString()
Definition:
JsCode.php:24
Ubiquity\js
Definition:
Jquery.php:3
Ubiquity\js\JsCode\__construct
__construct($code)
Definition:
JsCode.php:20
Ubiquity\js\JsCode
Code javascript.
Definition:
JsCode.php:10
Ubiquity\js\JsCode\getCode
getCode()
Definition:
JsCode.php:28
Ubiquity
js
JsCode.php
Generated on Thu May 31 2018 02:05:16 for
Ubiquity
by
doxygen
1.8.13