| 1 |
<?php |
| 2 |
/** |
| 3 |
* Service Provider Interface |
| 4 |
* |
| 5 |
* @package Forge12\DoubleOptIn\Container |
| 6 |
* @since 4.0.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace Forge12\DoubleOptIn\Container; |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* Interface ServiceProviderInterface |
| 17 |
* |
| 18 |
* @internal |
| 19 |
* |
| 20 |
* Service providers are responsible for registering bindings in the container. |
| 21 |
* Used by Core to wire its own services. Addons do NOT implement this — |
| 22 |
* they register their services inline inside {@see \Forge12\DoubleOptIn\Addon\AddonInterface::boot()}. |
| 23 |
*/ |
| 24 |
interface ServiceProviderInterface { |
| 25 |
|
| 26 |
/** |
| 27 |
* Register bindings in the container. |
| 28 |
* |
| 29 |
* This method is called before boot. |
| 30 |
* |
| 31 |
* @param Container $container The DI container. |
| 32 |
* |
| 33 |
* @return void |
| 34 |
*/ |
| 35 |
public function register( Container $container ): void; |
| 36 |
} |
| 37 |
|