This commit is contained in:
Paolo A
2024-08-13 13:44:16 +00:00
parent 1bbb23088d
commit e796d76612
4001 changed files with 30101 additions and 40075 deletions

View File

@@ -18,9 +18,18 @@ use Psr\Container\ContainerInterface;
*
* @author Nicolas Grekas <p@tchwork.com>
* @author Mateusz Sip <mateusz.sip@gmail.com>
*
* @template-covariant T of mixed
*/
interface ServiceProviderInterface extends ContainerInterface
{
/**
* @return T
*/
public function get(string $id): mixed;
public function has(string $id): bool;
/**
* Returns an associative array of service types keyed by the identifiers provided by the current container.
*
@@ -30,7 +39,7 @@ interface ServiceProviderInterface extends ContainerInterface
* * ['foo' => '?'] means the container provides service name "foo" of unspecified type
* * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null
*
* @return string[] The provided service types, keyed by service names
* @return array<string, string> The provided service types, keyed by service names
*/
public function getProvidedServices(): array;
}