service_collection
class service_collection extends ArrayObject
Collection of services to be configured at container compile time.
Properties
protected ContainerInterface | $container | ||
protected array | $service_classes |
Methods
__construct(ContainerInterface $container)
Constructor
getIterator()
{@inheritdoc}
offsetGet($index)
{@inheritdoc}
void
add(string $name)
Add a service to the collection
add_service_class(string $service_id, string $class)
Add a service's class to the collection
array
get_service_classes()
Get services' classes
mixed
get_by_class($class)
Returns the service associated to a class
Details
at line 38
__construct(ContainerInterface $container)
Constructor
at line 47
getIterator()
{@inheritdoc}
at line 55
offsetGet($index)
{@inheritdoc}
at line 66
void
add(string $name)
Add a service to the collection
at line 77
add_service_class(string $service_id, string $class)
Add a service's class to the collection
at line 87
array
get_service_classes()
Get services' classes
at line 98
mixed
get_by_class($class)
Returns the service associated to a class