| 1 |
<?php |
| 2 |
|
| 3 |
declare (strict_types=1); |
| 4 |
namespace RyanHellyer\UniqueHeaders\Vendor\Inpsyde\Modularity\Module; |
| 5 |
|
| 6 |
use RyanHellyer\UniqueHeaders\Vendor\Psr\Container\ContainerInterface; |
| 7 |
/** |
| 8 |
* @phpstan-type Service callable(ContainerInterface $container): mixed |
| 9 |
*/ |
| 10 |
interface ServiceModule extends Module |
| 11 |
{ |
| 12 |
/** |
| 13 |
* Return application services' factories. |
| 14 |
* |
| 15 |
* Array keys will be services' IDs in the container, array values are callback that |
| 16 |
* accepts a PSR-11 container as parameter and return an instance of the service. |
| 17 |
* Services are "cached", so the given factory is called once the first time `get()` is called |
| 18 |
* in the container, and on subsequent `get()` the same instance is returned again and again. |
| 19 |
* |
| 20 |
* @return array<string, Service> |
| 21 |
*/ |
| 22 |
public function services(): array; |
| 23 |
} |
| 24 |
|