25 lines
636 B
PHP
25 lines
636 B
PHP
|
|
<?php
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Phred\Support\Contracts;
|
||
|
|
|
||
|
|
use DI\Container;
|
||
|
|
use DI\ContainerBuilder;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Service providers can register bindings before the container is built
|
||
|
|
* and perform boot-time work after the container is available.
|
||
|
|
*/
|
||
|
|
interface ServiceProviderInterface
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Register container definitions/bindings. Called before the container is built.
|
||
|
|
*/
|
||
|
|
public function register(ContainerBuilder $builder, ConfigInterface $config): void;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Boot after the container has been built. Safe to resolve services here.
|
||
|
|
*/
|
||
|
|
public function boot(Container $container): void;
|
||
|
|
}
|