Interface ContainerApplicationInterface
Interface for applications that configure and use a dependency injection container.
Method Summary
-
getContainer() public
Create a new container and register services.
This will
register()services provided by both the application and any plugins if the application has plugin support. -
services() public
Register services to the container
Registered services can have instances fetched out of the container using
get(). Dependencies and parameters will be resolved based on service definitions.
Method Detail
getContainer() ¶ public
getContainer(): Cake\Container\ContainerInterface
Create a new container and register services.
This will register() services provided by both the application
and any plugins if the application has plugin support.
Returns
Cake\Container\ContainerInterfaceA populated container
services() ¶ public
services(Cake\Container\ContainerInterface $container): void
Register services to the container
Registered services can have instances fetched out of the container
using get(). Dependencies and parameters will be resolved based
on service definitions.
Parameters
-
Cake\Container\ContainerInterface$container The container to add services to
Returns
void