Interface ContainerApplicationInterface
Interface for applications that configure and use a dependency injection container.
Namespace: Cake\Core
Method Summary
-
getContainer() public
Create a new container and register services.
-
services() public
Register services to the container
Method Detail
getContainer() ¶ public
getContainer(): Cake\Core\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\Core\ContainerInterface
services() ¶ public
services(Cake\Core\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\Core\ContainerInterface
$container The container to add services to
Returns
void