1 | <?php |
||
21 | class Main |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Module class instance |
||
26 | * @var \gplcart\core\Module $module |
||
27 | */ |
||
28 | protected $module; |
||
29 | |||
30 | /** |
||
31 | * Library class instance |
||
32 | * @var \gplcart\core\Library $library |
||
33 | */ |
||
34 | protected $library; |
||
35 | |||
36 | /** |
||
37 | * Session helper class instance |
||
38 | * @var \gplcart\core\helpers\Session $session |
||
39 | */ |
||
40 | protected $session; |
||
41 | |||
42 | /** |
||
43 | * @param Module $module |
||
44 | * @param Library $library |
||
45 | * @param SessionHelper $session |
||
46 | */ |
||
47 | public function __construct(Module $module, Library $library, SessionHelper $session) |
||
53 | |||
54 | /** |
||
55 | * Implements hook "library.list" |
||
56 | * @param array $libraries |
||
57 | */ |
||
58 | public function hookLibraryList(array &$libraries) |
||
77 | |||
78 | /** |
||
79 | * Implements hook "route.list" |
||
80 | * @param array $routes |
||
81 | */ |
||
82 | public function hookRouteList(array &$routes) |
||
91 | |||
92 | /** |
||
93 | * Implements hook "theme" |
||
94 | * @param \gplcart\core\Controller $controller |
||
95 | */ |
||
96 | public function hookTheme($controller) |
||
100 | |||
101 | /** |
||
102 | * Implements hook "module.enable.after" |
||
103 | */ |
||
104 | public function hookModuleEnableAfter() |
||
108 | |||
109 | /** |
||
110 | * Implements hook "module.disable.after" |
||
111 | */ |
||
112 | public function hookModuleDisableAfter() |
||
116 | |||
117 | /** |
||
118 | * Implements hook "module.install.after" |
||
119 | */ |
||
120 | public function hookModuleInstallAfter() |
||
124 | |||
125 | /** |
||
126 | * Implements hook "module.uninstall.after" |
||
127 | */ |
||
128 | public function hookModuleUninstallAfter() |
||
132 | |||
133 | /** |
||
134 | * Returns a device type |
||
135 | * @return string |
||
136 | */ |
||
137 | public function getDeviceType() |
||
162 | |||
163 | /** |
||
164 | * Returns the mobile detector instance |
||
165 | * @return \Mobile_Detect |
||
166 | * @throws DependencyException |
||
167 | */ |
||
168 | public function getLibrary() |
||
178 | |||
179 | /** |
||
180 | * Switch the current theme |
||
181 | * @param \gplcart\core\Controller $controller |
||
182 | * @return bool |
||
183 | */ |
||
184 | protected function switchTheme($controller) |
||
207 | |||
208 | } |
||
209 |