2017 © Pedro PelĆ”ez
 

cakephp-plugin cakephp-container-interop

Container Interoperability plugin for CakePHP 2.x

image

eimanavicius/cakephp-container-interop

Container Interoperability plugin for CakePHP 2.x

  • Monday, September 19, 2016
  • by eimanavicius
  • Repository
  • 1 Watchers
  • 2 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

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., (*1)

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., (*2)

Installation

Installation through composer is HIGHLY RECOMMENDED. Installation can be done manually, but requires a lot more steps and is not supported officially., (*3)

composer

composer require eimanavicius/cakephp-container-interop

or add requirement to your composer.json file manually and don't forget to run composer update, (*4)

{
  "require": {
    "eimanavicius/cakephp-container-interop": "^0.0"
  }
}

Configuration

Plugin loading

Load the plugin as any other plugin in app/Config/bootstrap.php:, (*5)

CakePlugin::load('ContainerInterop', array('bootstrap' => true));

The bootstrap file must be loaded, to set up all configurations needed., (*6)

Add pre-configured service container

By installing Zend Service Manager plugin., (*7)

More pre-configured service containers will be provided as they appear., (*8)

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:, (*9)

Configure::write('Interop\Container\ContainerInterface', 'app/Config/container.php');

app/Config/container.php sample

<?php

// Build container
$container = new SomeServiceContainer();

return $container;

The Versions

19/09 2016

dev-master

9999999-dev

Container Interoperability plugin for CakePHP 2.x

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nerijus Eimanavičius

06/06 2016

0.0.1

0.0.1.0

Container Interoperability plugin for CakePHP 2.x

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nerijus Eimanavičius