ContainerApplicationInterface
in
Interface for applications that configure and use a dependency injection container.
Table of Contents
Methods
- getContainer() : ContainerInterface
- Create a new container and register services.
- services() : void
- Register services to the container
Methods
getContainer()
Create a new container and register services.
public
getContainer() : ContainerInterface
This will register()
services provided by both the application
and any plugins if the application has plugin support.
Return values
ContainerInterface —A populated container
services()
Register services to the container
public
services(ContainerInterface $container) : void
Registered services can have instances fetched out of the container
using get()
. Dependencies and parameters will be resolved based
on service definitions.
Parameters
- $container : ContainerInterface
-
The container to add services to