1 | <?php |
||
18 | class Device extends Module |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Library class instance |
||
23 | * @var \gplcart\core\Library |
||
24 | */ |
||
25 | protected $library; |
||
26 | |||
27 | /** |
||
28 | * @param Library $library |
||
29 | */ |
||
30 | public function __construct(Library $library) |
||
36 | |||
37 | /** |
||
38 | * Implements hook "route.list" |
||
39 | * @param mixed $routes |
||
40 | */ |
||
41 | public function hookRouteList(&$routes) |
||
51 | |||
52 | /** |
||
53 | * Implements hook "theme" |
||
54 | * @param \gplcart\core\Controller $controller |
||
55 | */ |
||
56 | public function hookTheme(\gplcart\core\Controller $controller) |
||
74 | |||
75 | /** |
||
76 | * Returns device type |
||
77 | * @param \gplcart\core\Controller $controller |
||
78 | * @return string |
||
79 | */ |
||
80 | protected function getDevice(\gplcart\core\Controller $controller) |
||
105 | |||
106 | /** |
||
107 | * Returns instance on detector class |
||
108 | * @return \Mobile_Detect |
||
109 | * @throws \InvalidArgumentException |
||
110 | */ |
||
111 | protected function getDetectorInstance() |
||
121 | |||
122 | /** |
||
123 | * Implements hook "library.list" |
||
124 | * @param array $libraries |
||
125 | */ |
||
126 | public function hookLibraryList(array &$libraries) |
||
145 | |||
146 | /** |
||
147 | * Implements hook "module.enable.after" |
||
148 | */ |
||
149 | public function hookModuleEnableAfter() |
||
153 | |||
154 | /** |
||
155 | * Implements hook "module.disable.after" |
||
156 | */ |
||
157 | public function hookModuleDisableAfter() |
||
161 | |||
162 | /** |
||
163 | * Implements hook "module.install.after" |
||
164 | */ |
||
165 | public function hookModuleInstallAfter() |
||
169 | |||
170 | /** |
||
171 | * Implements hook "module.uninstall.after" |
||
172 | */ |
||
173 | public function hookModuleUninstallAfter() |
||
177 | |||
178 | } |
||
179 |