Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class GruntClientScript extends CClientScript |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var array list of bundled files |
||
17 | */ |
||
18 | public $bundledFiles = array(); |
||
19 | |||
20 | /** |
||
21 | * {@inheritDoc} |
||
22 | */ |
||
23 | public function registerScriptFile($url, $position = null, array $htmlOptions = array()) |
||
24 | { |
||
25 | if ($this->isBundled($url)) |
||
26 | return $this; |
||
27 | |||
28 | return parent::registerScriptFile($url, $position, $htmlOptions); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * {@inheritDoc} |
||
33 | */ |
||
34 | public function registerCssFile($url, $media = '') |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Checks whether a particular URL should be registered or not |
||
44 | * @param string $url the asset URL |
||
45 | * @return boolean whether the item is bundled |
||
46 | */ |
||
47 | private function isBundled($url) |
||
59 |