| 1 |
<?php |
| 2 |
/** |
| 3 |
* The implementation of the Pimple service provider interface. |
| 4 |
* |
| 5 |
* @since 1.6.0 |
| 6 |
* |
| 7 |
* @package woo-additional-terms |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace Woo_Additional_Terms; |
| 11 |
|
| 12 |
/** |
| 13 |
* Class PluginServiceProvider. |
| 14 |
*/ |
| 15 |
class PluginServiceProvider implements Vendor\Pimple\ServiceProviderInterface { |
| 16 |
|
| 17 |
/** |
| 18 |
* Registers services on the given container. |
| 19 |
* |
| 20 |
* This method should only be used to configure services and parameters. |
| 21 |
* It should not get services. |
| 22 |
* |
| 23 |
* @since 1.6.0 |
| 24 |
* |
| 25 |
* @param Vendor\Pimple\Container $pimple Container instance. |
| 26 |
*/ |
| 27 |
public function register( $pimple ) { |
| 28 |
|
| 29 |
// Plugin core. |
| 30 |
$pimple['template_manager'] = fn() => new TemplateManager(); |
| 31 |
|
| 32 |
// Plugin settings. |
| 33 |
$pimple['settings'] = fn() => new Settings\Settings(); |
| 34 |
$pimple['settings_general'] = fn() => new Settings\Sections\General(); |
| 35 |
$pimple['options'] = fn() => new Settings\Options(); |
| 36 |
|
| 37 |
// Plugin WooCommerce. |
| 38 |
$pimple['terms'] = fn() => new WooCommerce\Terms(); |
| 39 |
} |
| 40 |
} |
| 41 |
|