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) |
||
72 | |||
73 | /** |
||
74 | * Implements hook "route.list" |
||
75 | * @param array $routes |
||
76 | */ |
||
77 | public function hookRouteList(array &$routes) |
||
86 | |||
87 | /** |
||
88 | * Implements hook "theme" |
||
89 | * @param Controller $controller |
||
90 | */ |
||
91 | public function hookTheme(Controller $controller) |
||
95 | |||
96 | /** |
||
97 | * Returns a device type |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getDeviceType() |
||
121 | |||
122 | /** |
||
123 | * Returns the mobile detector instance |
||
124 | * @return \Mobile_Detect |
||
125 | * @throws LogicException |
||
126 | */ |
||
127 | public function getLibrary() |
||
137 | |||
138 | /** |
||
139 | * Switch the current theme |
||
140 | * @param Controller $controller |
||
141 | */ |
||
142 | protected function switchTheme(Controller $controller) |
||
164 | |||
165 | } |
||
166 |