1 | <?php |
||
22 | class Main |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * Module class instance |
||
27 | * @var \gplcart\core\Module $module |
||
28 | */ |
||
29 | protected $module; |
||
30 | |||
31 | /** |
||
32 | * Library class instance |
||
33 | * @var \gplcart\core\Library $library |
||
34 | */ |
||
35 | protected $library; |
||
36 | |||
37 | /** |
||
38 | * Session helper class instance |
||
39 | * @var \gplcart\core\helpers\Session $session |
||
40 | */ |
||
41 | protected $session; |
||
42 | |||
43 | /** |
||
44 | * @param Module $module |
||
45 | * @param Library $library |
||
46 | * @param Session $session |
||
47 | */ |
||
48 | public function __construct(Module $module, Library $library, Session $session) |
||
54 | |||
55 | /** |
||
56 | * Implements hook "library.list" |
||
57 | * @param array $libraries |
||
58 | */ |
||
59 | public function hookLibraryList(array &$libraries) |
||
78 | |||
79 | /** |
||
80 | * Implements hook "route.list" |
||
81 | * @param array $routes |
||
82 | */ |
||
83 | public function hookRouteList(array &$routes) |
||
92 | |||
93 | /** |
||
94 | * Implements hook "theme" |
||
95 | * @param Controller $controller |
||
96 | */ |
||
97 | public function hookTheme(Controller $controller) |
||
101 | |||
102 | /** |
||
103 | * Implements hook "module.enable.after" |
||
104 | */ |
||
105 | public function hookModuleEnableAfter() |
||
109 | |||
110 | /** |
||
111 | * Implements hook "module.disable.after" |
||
112 | */ |
||
113 | public function hookModuleDisableAfter() |
||
117 | |||
118 | /** |
||
119 | * Implements hook "module.install.after" |
||
120 | */ |
||
121 | public function hookModuleInstallAfter() |
||
125 | |||
126 | /** |
||
127 | * Implements hook "module.uninstall.after" |
||
128 | */ |
||
129 | public function hookModuleUninstallAfter() |
||
133 | |||
134 | /** |
||
135 | * Returns a device type |
||
136 | * @return string |
||
137 | */ |
||
138 | public function getDeviceType() |
||
159 | |||
160 | /** |
||
161 | * Returns the mobile detector instance |
||
162 | * @return \Mobile_Detect |
||
163 | * @throws LogicException |
||
164 | */ |
||
165 | public function getLibrary() |
||
175 | |||
176 | /** |
||
177 | * Switch the current theme |
||
178 | * @param Controller $controller |
||
179 | */ |
||
180 | protected function switchTheme(Controller $controller) |
||
202 | |||
203 | } |
||
204 |