Merge pull request #22548 from eileenmcnaughton/raw
[civicrm-core.git] / CRM / Extension / Upgrader / Interface.php
1 <?php
2
3 /**
4 * An "upgrader" is a class that handles the DB install+upgrade lifecycle
5 * for an extension.
6 */
7 interface CRM_Extension_Upgrader_Interface {
8
9 /**
10 * @param array $params
11 * - string $key: Long form name ('org.example.myext')
12 */
13 public function init(array $params);
14
15 /**
16 * Notify the upgrader about a key lifecycle event, such as installation or uninstallation.
17 *
18 * Each event corresponds to a hook, such as `hook_civicrm_install` or `hook_civicrm_upgrade`.
19 *
20 * @param string $event
21 * One of the following: 'install', 'onPostInstall', 'enable', 'disable', 'uninstall', 'upgrade'
22 * @param array $params
23 * Any data that would ordinarily be provided via the equivalent hook.
24 *
25 * @return mixed
26 */
27 public function notify(string $event, array $params = []);
28
29 }