1 | <?php |
||
14 | class Alias |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Absolute path to current view folder |
||
19 | * @var string |
||
20 | */ |
||
21 | public $currentViewPath; |
||
22 | |||
23 | /** |
||
24 | * Return full URL of current view folder |
||
25 | * @var string |
||
26 | */ |
||
27 | public $currentViewUrl; |
||
28 | |||
29 | /** |
||
30 | * Current app basic domain address, obtained from request |
||
31 | * @var string |
||
32 | */ |
||
33 | public $baseDomain; |
||
34 | |||
35 | /** |
||
36 | * Current app basic URL without language path |
||
37 | * @var string |
||
38 | */ |
||
39 | public $baseUrlNoLang; |
||
40 | |||
41 | /** |
||
42 | * Current app basic URL address, obtained from request |
||
43 | * @var string |
||
44 | */ |
||
45 | public $baseUrl; |
||
46 | |||
47 | /** |
||
48 | * Current app basic URL without any changes in pathway(lang-defined, etc) |
||
49 | * @var string |
||
50 | */ |
||
51 | public $scriptUrl; |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Default vendor library's |
||
56 | * @var array |
||
57 | */ |
||
58 | protected $vendorNamedLibrary = [ |
||
59 | 'js' => null, |
||
60 | 'css' => null |
||
61 | ]; |
||
62 | |||
63 | /** |
||
64 | * Custom code library's |
||
65 | * @var array |
||
66 | */ |
||
67 | protected $codeCustomLibrary = [ |
||
68 | 'js' => null, |
||
69 | 'css' => null |
||
70 | ]; |
||
71 | |||
72 | /** |
||
73 | * Custom code storage for templates |
||
74 | * @var array |
||
75 | */ |
||
76 | protected $plainCode = [ |
||
77 | 'js' => null, |
||
78 | 'css' => null |
||
79 | ]; |
||
80 | |||
81 | |||
82 | public function __construct() |
||
117 | |||
118 | /** |
||
119 | * @param string $type |
||
120 | * @param string $name |
||
121 | * @return string|null |
||
122 | */ |
||
123 | public function getVendor($type, $name) |
||
127 | |||
128 | /** |
||
129 | * Set custom library $link by $type |
||
130 | * @param string $type |
||
131 | * @param string $link |
||
132 | */ |
||
133 | public function setCustomLibrary($type, $link) |
||
137 | |||
138 | /** |
||
139 | * Get custom library array by type |
||
140 | * @param string $type |
||
141 | * @return array|null |
||
142 | */ |
||
143 | public function getCustomLibraryArray($type) |
||
147 | |||
148 | /** |
||
149 | * Unset custom library's by type |
||
150 | * @param $type |
||
151 | */ |
||
152 | public function unsetCustomLibrary($type) |
||
156 | |||
157 | /** |
||
158 | * @param string $type |
||
159 | * @param string $code |
||
160 | * @return bool |
||
161 | */ |
||
162 | public function addPlainCode($type, $code) |
||
172 | |||
173 | /** |
||
174 | * Get plain code build container as string |
||
175 | * @param string $type |
||
176 | * @return null|string |
||
177 | */ |
||
178 | public function getPlainCode($type) |
||
182 | |||
183 | |||
184 | } |