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 address, obtained from request |
||
37 | * @var string |
||
38 | */ |
||
39 | public $baseUrl; |
||
40 | |||
41 | /** |
||
42 | * Current app basic URL without any changes in pathway(lang-defined, etc) |
||
43 | * @var string |
||
44 | */ |
||
45 | public $scriptUrl; |
||
46 | |||
47 | |||
48 | /** |
||
49 | * Default vendor library's |
||
50 | * @var array |
||
51 | */ |
||
52 | protected $vendorNamedLibrary = [ |
||
53 | 'js' => null, |
||
54 | 'css' => null |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * Custom code library's |
||
59 | * @var array |
||
60 | */ |
||
61 | protected $codeCustomLibrary = [ |
||
62 | 'js' => null, |
||
63 | 'css' => null |
||
64 | ]; |
||
65 | |||
66 | /** |
||
67 | * Custom code storage for templates |
||
68 | * @var array |
||
69 | */ |
||
70 | protected $plainCode = [ |
||
71 | 'js' => null, |
||
72 | 'css' => null |
||
73 | ]; |
||
74 | |||
75 | |||
76 | public function __construct() |
||
106 | |||
107 | /** |
||
108 | * @param string $type |
||
109 | * @param string $name |
||
110 | * @return string|null |
||
111 | */ |
||
112 | public function getVendor($type, $name) |
||
116 | |||
117 | /** |
||
118 | * Set custom library $link by $type |
||
119 | * @param string $type |
||
120 | * @param string $link |
||
121 | */ |
||
122 | public function setCustomLibrary($type, $link) |
||
126 | |||
127 | /** |
||
128 | * Get custom library array by type |
||
129 | * @param string $type |
||
130 | * @return array|null |
||
131 | */ |
||
132 | public function getCustomLibraryArray($type) |
||
136 | |||
137 | /** |
||
138 | * Unset custom library's by type |
||
139 | * @param $type |
||
140 | */ |
||
141 | public function unsetCustomLibrary($type) |
||
145 | |||
146 | /** |
||
147 | * @param string $type |
||
148 | * @param string $code |
||
149 | * @return bool |
||
150 | */ |
||
151 | public function addPlainCode($type, $code) |
||
161 | |||
162 | /** |
||
163 | * Get plain code build container as string |
||
164 | * @param string $type |
||
165 | * @return null|string |
||
166 | */ |
||
167 | public function getPlainCode($type) |
||
171 | |||
172 | |||
173 | } |