|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 115 ||All time: 9,432 This week: 135|
This package is a interoperable container integration with CakePHP.
It extends the CakePHP base component class and implements the service container interface, so application services and other types of applications not based on CakePHP can be easily used with CakePHP.
|Dependency injection is design pattern often used implement functionality on one class using objects from external classes without hardcoding the dependency between the two classes.
Several PHP frameworks implement their own dependency injection containers but since each one implements it in a different way, a generic container interface was defined to allow to call components of one framework to be called from by components of any other framework.
The package implements a component with the generic dependency injection container interface so application services and other types of applications not based on CakePHP can be easily used with CakePHP.
Container Interop in CakePHP
Container Interoperability plugin for CakePHP 2.x. This plugin adds the ability to easy configure any service containers compatible with container-interop.
It provides the clean component to access you container or services in container. Also you get container registered in ClassRegistry that allows you to gradually migrate your application.
Installation through composer is HIGHLY RECOMMENDED. Installation can be done manually, but requires a lot more steps and is not supported officially.
composer require eimanavicius/cakephp-container-interop
or add requirement to your
composer.json file manually and don't forget to run
Load the plugin as any other plugin in
CakePlugin::load('ContainerInterop', array('bootstrap' => true));
The bootstrap file must be loaded, to set up all configurations needed.
Add pre-configured service container
By installing Zend Service Manager plugin.
More pre-configured service containers will be provided as they appear.
Or configure your container instance
By default container is loaded from file
app/Config/container.php (file should return configured service container instance as in sample below). You can change file location by specifying config value before plugin load:
// Build container
$container = new SomeServiceContainer();
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.
||Other classes that need this package