1 | <?php |
||
18 | class Scripts extends AbstractSeries |
||
19 | { |
||
20 | private $capture; |
||
21 | |||
22 | /** |
||
23 | * |
||
24 | * Adds a <script> tag to the stack. |
||
25 | * |
||
26 | * @param string $src The source href for the script. |
||
27 | * |
||
28 | * @param int $pos The script position in the stack. |
||
29 | * |
||
30 | * @param array $attr The additional attributes |
||
31 | * |
||
32 | * @return null |
||
33 | * |
||
34 | */ |
||
35 | 2 | public function add($src, $pos = 100, $attr = array()) |
|
43 | |||
44 | /** |
||
45 | * |
||
46 | * Adds a conditional `<!--[if ...]><script><![endif] -->` tag to the |
||
47 | * stack. |
||
48 | * |
||
49 | * @param string $cond The conditional expression for the script. |
||
50 | * |
||
51 | * @param string $src The source href for the script. |
||
52 | * |
||
53 | * @param string $pos The script position in the stack. |
||
54 | * |
||
55 | * @param array $attr The additional attributes |
||
56 | * |
||
57 | * @return null |
||
58 | * |
||
59 | */ |
||
60 | 1 | public function addCond($cond, $src, $pos = 100, array $attr = array()) |
|
69 | |||
70 | /** |
||
71 | * Adds internal script |
||
72 | * |
||
73 | * @param mixed $script The script |
||
74 | * @param int $pos The script position in the stack. |
||
75 | * @param array $attr The additional attributes |
||
76 | * |
||
77 | * @return Scripts |
||
78 | * |
||
79 | * @access public |
||
80 | */ |
||
81 | 1 | public function addInternal($script, $pos = 100, array $attr = array()) |
|
88 | |||
89 | /** |
||
90 | * Add Conditional internal script |
||
91 | * |
||
92 | * @param mixed $cond The conditional expression for the script. |
||
93 | * @param mixed $script The script |
||
94 | * @param int $pos The script position in the stack. |
||
95 | * @param array $attr The additional attributes |
||
96 | * |
||
97 | * @return Scripts |
||
98 | * |
||
99 | * @access public |
||
100 | */ |
||
101 | 1 | public function addCondInternal($cond, $script, $pos = 100, array $attr = array()) |
|
110 | |||
111 | /** |
||
112 | * Adds internal script |
||
113 | * |
||
114 | * @param int $pos The script position in the stack. |
||
115 | * @param array $attr The additional attributes |
||
116 | * |
||
117 | * |
||
118 | * @return void |
||
119 | * |
||
120 | * @access public |
||
121 | */ |
||
122 | 1 | public function beginInternal($pos = 100, array $attr = array()) |
|
127 | |||
128 | /** |
||
129 | * Begin Conditional Internal Capture |
||
130 | * |
||
131 | * @param mixed $cond condition |
||
132 | * @param int $pos position |
||
133 | * @param array $attr The additional attributes |
||
134 | * |
||
135 | * @return void |
||
136 | * |
||
137 | * @access public |
||
138 | */ |
||
139 | 1 | public function beginCondInternal($cond, $pos = 100, array $attr = array()) |
|
144 | |||
145 | /** |
||
146 | * End internal script capture |
||
147 | * |
||
148 | * @return mixed |
||
149 | * |
||
150 | * @access public |
||
151 | */ |
||
152 | 1 | public function endInternal() |
|
166 | |||
167 | /** |
||
168 | * Fix and escape script attributes |
||
169 | * |
||
170 | * @param mixed $src script source |
||
171 | * @param array $attr additional attributes |
||
172 | * |
||
173 | * @return string |
||
174 | * |
||
175 | * @access protected |
||
176 | */ |
||
177 | 3 | protected function attr($src = null, array $attr = array()) |
|
185 | } |
||
186 |