AnalystContract.php
11 months ago
CacheContract.php
11 months ago
HttpClientContract.php
11 months ago
RequestContract.php
11 months ago
RequestorContract.php
11 months ago
TrackerContract.php
11 months ago
TrackerContract.php
70 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Analyst\Contracts; |
| 4 | |
| 5 | interface TrackerContract |
| 6 | { |
| 7 | /** |
| 8 | * Should register activation and deactivation |
| 9 | * event hooks |
| 10 | * |
| 11 | * @return void |
| 12 | */ |
| 13 | public function registerHooks(); |
| 14 | |
| 15 | /** |
| 16 | * Will fire when admin activates plugin |
| 17 | * |
| 18 | * @return void |
| 19 | */ |
| 20 | public function onActivePluginListener(); |
| 21 | |
| 22 | /** |
| 23 | * Will fire when admin deactivates plugin |
| 24 | * |
| 25 | * @return void |
| 26 | */ |
| 27 | public function onDeactivatePluginListener(); |
| 28 | |
| 29 | /** |
| 30 | * Will fire when user opted in |
| 31 | * |
| 32 | * @return void |
| 33 | */ |
| 34 | public function onOptInListener(); |
| 35 | |
| 36 | /** |
| 37 | * Will fire when user opted out |
| 38 | * |
| 39 | * @return void |
| 40 | */ |
| 41 | public function onOptOutListener(); |
| 42 | |
| 43 | /** |
| 44 | * Will fire when user accept opt/in at first time |
| 45 | * |
| 46 | * @return void |
| 47 | */ |
| 48 | public function onInstallListener(); |
| 49 | |
| 50 | /** |
| 51 | * Will fire when user skipped installation |
| 52 | * |
| 53 | * @return void |
| 54 | */ |
| 55 | public function onSkipInstallListener(); |
| 56 | |
| 57 | /** |
| 58 | * Will fire when user delete plugin through admin panel. |
| 59 | * This action will happen if admin at least once |
| 60 | * activated the plugin. |
| 61 | * |
| 62 | * The register_uninstall_hook function accepts only static |
| 63 | * function or global function to be executed, so this is |
| 64 | * why this method is static |
| 65 | * |
| 66 | * @return void |
| 67 | */ |
| 68 | public static function onUninstallPluginListener(); |
| 69 | } |
| 70 |