| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | class TJavaScriptAsset |
||
| 29 | { |
||
| 30 | protected $_url; |
||
| 31 | |||
| 32 | protected $_async; |
||
| 33 | |||
| 34 | public function __construct($url, $async = false) |
||
| 38 | } |
||
| 39 | |||
| 40 | public function __toString() |
||
| 41 | { |
||
| 42 | $async = $this->getAsync() ? 'async ' : ''; |
||
| 43 | return '<script ' . $async . 'src="' . THttpUtility::htmlEncode($this->getUrl()) . '"></script>'; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getUrl() |
||
| 47 | { |
||
| 48 | return $this->_url; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function setUrl($url) |
||
| 52 | { |
||
| 53 | $this->_url = $url; |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getAsync() |
||
| 59 | } |
||
| 60 | |||
| 61 | public function setAsync($async) |
||
| 64 | } |
||
| 65 | } |
||
| 66 |