1 | <?php |
||
14 | class Scripts extends AbstractSeries |
||
15 | { |
||
16 | private $_capture; |
||
17 | |||
18 | /** |
||
19 | * Adds a <script> tag to the stack. |
||
20 | * |
||
21 | * @param string $src The source href for the script. |
||
22 | * @param int $pos The script position in the stack. |
||
23 | * @param array $attr The additional attributes |
||
24 | * |
||
25 | * @return Scripts |
||
26 | */ |
||
27 | 2 | public function add($src, $pos = 100, $attr = array()) |
|
35 | |||
36 | /** |
||
37 | * Adds a conditional `<!--[if ...]><script><![endif] -->` tag to the |
||
38 | * stack. |
||
39 | * |
||
40 | * @param string $cond The conditional expression for the script. |
||
41 | * @param string $src The source href for the script. |
||
42 | * @param string $pos The script position in the stack. |
||
43 | * @param array $attr The additional attributes |
||
44 | * |
||
45 | * @return Scripts |
||
46 | */ |
||
47 | 1 | public function addCond($cond, $src, $pos = 100, array $attr = array()) |
|
56 | |||
57 | /** |
||
58 | * Adds internal script |
||
59 | * |
||
60 | * @param mixed $script The script |
||
61 | * @param int $pos The script position in the stack. |
||
62 | * @param array $attr The additional attributes |
||
63 | * |
||
64 | * @return Scripts |
||
65 | * |
||
66 | * @access public |
||
67 | */ |
||
68 | 1 | public function addInternal($script, $pos = 100, array $attr = array()) |
|
75 | |||
76 | /** |
||
77 | * Add Conditional internal script |
||
78 | * |
||
79 | * @param mixed $cond The conditional expression for the script. |
||
80 | * @param mixed $script The script |
||
81 | * @param int $pos The script position in the stack. |
||
82 | * @param array $attr The additional attributes |
||
83 | * |
||
84 | * @return Scripts |
||
85 | * |
||
86 | * @access public |
||
87 | */ |
||
88 | 1 | public function addCondInternal( |
|
98 | |||
99 | /** |
||
100 | * Adds internal script |
||
101 | * |
||
102 | * @param int $pos The script position in the stack. |
||
103 | * @param array $attr The additional attributes |
||
104 | * |
||
105 | * @return null |
||
106 | * |
||
107 | * @access public |
||
108 | */ |
||
109 | 1 | public function beginInternal($pos = 100, array $attr = array()) |
|
114 | |||
115 | /** |
||
116 | * Begin Conditional Internal Capture |
||
117 | * |
||
118 | * @param mixed $cond condition |
||
119 | * @param int $pos position |
||
120 | * @param array $attr The additional attributes |
||
121 | * |
||
122 | * @return null |
||
123 | * |
||
124 | * @access public |
||
125 | */ |
||
126 | 1 | public function beginCondInternal($cond, $pos = 100, array $attr = array()) |
|
131 | |||
132 | /** |
||
133 | * End internal script capture |
||
134 | * |
||
135 | * @return Scripts |
||
136 | * |
||
137 | * @access public |
||
138 | */ |
||
139 | 1 | public function endInternal() |
|
153 | |||
154 | /** |
||
155 | * Fix and escape script attributes |
||
156 | * |
||
157 | * @param mixed $src script source |
||
158 | * @param array $attr additional attributes |
||
159 | * |
||
160 | * @return string |
||
161 | * |
||
162 | * @access protected |
||
163 | */ |
||
164 | 3 | protected function attr($src = null, array $attr = array()) |
|
172 | } |
||
173 |