Copied!

A ServiceProviderInterface that is also countable and iterable.

  • author Kevin Bond
  • template-covariant \T of mixed
  • extends \ServiceProviderInterface<\T>
  • extends \IteratorAggregate<string,\T>
AbstractInterface
Methods
public abstract Countable::count()
public abstract Symfony\Contracts\Service\ServiceProviderInterface::get(string $id) : ?mixed
 
  • return \T
public abstract IteratorAggregate::getIterator()
public abstract Symfony\Contracts\Service\ServiceProviderInterface::getProvidedServices() : array
 

Returns an associative array of service types keyed by the identifiers provided by the current container.

Examples:

  • ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface
  • ['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 array<string,string> The provided service types, keyed by service names
public abstract Symfony\Contracts\Service\ServiceProviderInterface::has(string $id) : bool
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration