| 1 | <?php |
||
| 16 | abstract class AbstractDataProvider |
||
| 17 | { |
||
| 18 | protected $plugins = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Register a plugin to be handled by ths provider |
||
| 22 | * |
||
| 23 | * @param string $pluginId The service name of the plugin. |
||
| 24 | * |
||
| 25 | * @param Object $pluginService The plugin object. |
||
| 26 | */ |
||
| 27 | public function registerPlugin($pluginId, $pluginService) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Remove a plugin so that it won't be handled anymore. |
||
| 34 | * |
||
| 35 | * @param $pluginId |
||
| 36 | * |
||
| 37 | */ |
||
| 38 | public function deletePlugin($pluginId) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Dispatch method call to all plugins. |
||
| 47 | * |
||
| 48 | * @param string $method method to call. |
||
| 49 | * @param array $params |
||
| 50 | */ |
||
| 51 | protected function dispatch($method, $params) |
||
| 57 | } |