1 | <?php |
||
19 | class Main |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Database class instance |
||
24 | * @var \gplcart\core\Database $db |
||
25 | */ |
||
26 | protected $db; |
||
27 | |||
28 | /** |
||
29 | * @param Config $config |
||
30 | */ |
||
31 | public function __construct(Config $config) |
||
36 | |||
37 | /** |
||
38 | * Implements hook "module.install.before" |
||
39 | * @param null|string $result |
||
40 | */ |
||
41 | public function hookModuleInstallBefore(&$result) |
||
54 | |||
55 | /** |
||
56 | * Implements hook "module.uninstall.after" |
||
57 | */ |
||
58 | public function hookModuleUninstallAfter() |
||
62 | |||
63 | /** |
||
64 | * Implements hook "user.role.permissions" |
||
65 | * @param array $permissions |
||
66 | */ |
||
67 | public function hookUserRolePermissions(array &$permissions) |
||
73 | |||
74 | /** |
||
75 | * Implements hook "route.list" |
||
76 | * @param array $routes |
||
77 | */ |
||
78 | public function hookRouteList(array &$routes) |
||
90 | |||
91 | /** |
||
92 | * Performs backup operation |
||
93 | * @param string $handler_id |
||
94 | * @param array $data |
||
95 | * @return boolean|string |
||
96 | */ |
||
97 | public function backup($handler_id, array $data) |
||
101 | |||
102 | /** |
||
103 | * Performs restore operation |
||
104 | * @param string $handler_id |
||
105 | * @param array $data |
||
106 | * @return boolean|string |
||
107 | */ |
||
108 | public function restore($handler_id, array $data) |
||
112 | |||
113 | /** |
||
114 | * Returns an array of defined handlers |
||
115 | * @return array |
||
116 | */ |
||
117 | public function getHandlers() |
||
121 | |||
122 | /** |
||
123 | * Whether a backup already exists |
||
124 | * @param string $id |
||
125 | * @param null|string $version |
||
126 | * @return bool |
||
127 | */ |
||
128 | public function exists($id, $version = null) |
||
132 | |||
133 | /** |
||
134 | * Returns backup model |
||
135 | * @return \gplcart\modules\backup\models\Backup |
||
136 | */ |
||
137 | protected function getModel() |
||
143 | |||
144 | /** |
||
145 | * Translation UI model instance |
||
146 | * @return \gplcart\core\models\Translation |
||
147 | */ |
||
148 | protected function getTranslationModel() |
||
154 | |||
155 | /** |
||
156 | * Returns an array of database scheme |
||
157 | * @return array |
||
158 | */ |
||
159 | protected function getDbScheme() |
||
176 | |||
177 | } |
||
178 |