@@ 308-320 (lines=13) @@ | ||
305 | ||
306 | public function ResolveCssHref($cssArray, $type = 'custom', &$hrefs) { |
|
307 | switch ($type) { |
|
308 | case'libs': |
|
309 | foreach ($cssArray as $css) { |
|
310 | if (is_array($css)) { |
|
311 | $this->ResolveCssHref($css, $type, $hrefs); |
|
312 | continue; |
|
313 | } |
|
314 | if (strpos($css, '//') !== false) |
|
315 | $href = $css; |
|
316 | else |
|
317 | $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
318 | $hrefs[$href] = $href; |
|
319 | } |
|
320 | break; |
|
321 | case'template': |
|
322 | foreach ($cssArray as $css) { |
|
323 | if (is_array($css)) { |
|
@@ 321-333 (lines=13) @@ | ||
318 | $hrefs[$href] = $href; |
|
319 | } |
|
320 | break; |
|
321 | case'template': |
|
322 | foreach ($cssArray as $css) { |
|
323 | if (is_array($css)) { |
|
324 | $this->ResolveCssHref($css, $type, $hrefs); |
|
325 | continue; |
|
326 | } |
|
327 | if (strpos($css, '://') !== false) |
|
328 | $href = $css; |
|
329 | else |
|
330 | $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}"; |
|
331 | $hrefs[$href] = $href; |
|
332 | } |
|
333 | break; |
|
334 | case 'custom': |
|
335 | foreach ($cssArray as $css) { |
|
336 | if (is_array($css)) { |
|
@@ 334-346 (lines=13) @@ | ||
331 | $hrefs[$href] = $href; |
|
332 | } |
|
333 | break; |
|
334 | case 'custom': |
|
335 | foreach ($cssArray as $css) { |
|
336 | if (is_array($css)) { |
|
337 | $this->ResolveCssHref($css, $type, $hrefs); |
|
338 | continue; |
|
339 | } |
|
340 | if (strpos($css, '//') !== false) |
|
341 | $href = $css; |
|
342 | else |
|
343 | $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
344 | $hrefs[$href] = $href; |
|
345 | } |
|
346 | break; |
|
347 | } |
|
348 | } |
|
349 | ||
@@ 474-486 (lines=13) @@ | ||
471 | $resultArray[] = $href; |
|
472 | } |
|
473 | break; |
|
474 | case'template': |
|
475 | foreach ($jsArray as $js) { |
|
476 | if (is_array($js)) { |
|
477 | $this->genScriptArray($js, $type, $resultArray); |
|
478 | continue; |
|
479 | } |
|
480 | if (strpos($js, '//') !== false) |
|
481 | $href = $js; |
|
482 | else |
|
483 | $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}"; |
|
484 | $resultArray[] = $href; |
|
485 | } |
|
486 | break; |
|
487 | case 'custom': |
|
488 | foreach ($jsArray as $js) { |
|
489 | if (is_array($js)) { |