phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
CDNCoreCss.php
Go to the documentation of this file.
1<?php
2
3namespace Ajax\lib;
4
5
8
9class CDNCoreCss extends CDNBase {
10 protected $cssUrl;
11 protected $localCss;
12 protected $framework;
13
14 public function __construct($framework,$version, $provider="MaxCDN") {
15 parent::__construct($version, $provider);
16 $this->framework=$framework;
17 $this->data=$this->data [$framework];
18 }
19
20 public function getUrl() {
21 return $this->getUrlOrCss($this->jsUrl, "core");
22 }
23
24 public function getCss() {
25 return $this->getUrlOrCss($this->cssUrl, "css");
26 }
27
28 public function __toString() {
29 $url=$this->getUrl();
30 $css=$this->getCss();
31 return HtmlUtils::javascriptInclude($url)."\n".HtmlUtils::stylesheetInclude($css);
32 }
33
34 public function setCssUrl($cssUrl, $local=null) {
35 $this->cssUrl=$cssUrl;
36 if (isset($local)===false) {
37 $local=JString::startsWith($cssUrl, "http")===false;
38 }
39 $this->setLocalCss($local);
40 return $this;
41 }
42
43 public function getLocalCss() {
44 return $this->localCss;
45 }
46
47 public function setLocalCss($localCss) {
48 $this->localCss=$localCss;
49 return $this;
50 }
51
52 public function getFramework() {
53 return $this->framework;
54 }
55
56}
getUrlOrCss($element, $key)
Definition CDNBase.php:36
setCssUrl($cssUrl, $local=null)
setLocalCss($localCss)
__construct($framework, $version, $provider="MaxCDN")