| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of the Symfony package. |
| 5 |
* |
| 6 |
* (c) Fabien Potencier <fabien@symfony.com> |
| 7 |
* |
| 8 |
* For the full copyright and license information, please view the LICENSE |
| 9 |
* file that was distributed with this source code. |
| 10 |
*/ |
| 11 |
namespace WindPressPackages\Symfony\Contracts\Service; |
| 12 |
|
| 13 |
use WindPressPackages\Psr\Container\ContainerInterface; |
| 14 |
/** |
| 15 |
* A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. |
| 16 |
* |
| 17 |
* @author Nicolas Grekas <p@tchwork.com> |
| 18 |
* @author Mateusz Sip <mateusz.sip@gmail.com> |
| 19 |
*/ |
| 20 |
interface ServiceProviderInterface extends ContainerInterface |
| 21 |
{ |
| 22 |
/** |
| 23 |
* Returns an associative array of service types keyed by the identifiers provided by the current container. |
| 24 |
* |
| 25 |
* Examples: |
| 26 |
* |
| 27 |
* * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface |
| 28 |
* * ['foo' => '?'] means the container provides service name "foo" of unspecified type |
| 29 |
* * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null |
| 30 |
* |
| 31 |
* @return string[] The provided service types, keyed by service names |
| 32 |
*/ |
| 33 |
public function getProvidedServices(): array; |
| 34 |
} |
| 35 |
|