2017 © Pedro Peláez
 

library rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

image

akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  • Saturday, February 6, 2016
  • by akrabat
  • Repository
  • 4 Watchers
  • 9 Stars
  • 2,564 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

Use Zend\ServiceManager with Slim 3

This component enables you to replace the default Pimple container in Slim 3 with Zend\ServiceManager., (*1)

Usage

  • composer require akrabat/rka-slim-zfsm-container
  • update index.php:, (*2)

    $settings = [
        'settings' => [
            // user settings go here
        ],
        'factories' => [
            // new SM factories go here
        ],
        // you can use any other SM key here too.
    ];
    $container = new RKA\ZsmSlimContainer\Container($settings);
    $app = new \Slim\App($container);
    

There is also an [example application][1]., (*3)

Overriding Slim's defaults

To override the default Slim handlers (e.g. errorHandler, notFound, etc), you can add them to the relevant section of $settings before instantiating the container:, (*4)

$settings = [
    'factories' => [
        'errorHandler' => function ($container) {
            // do your own thing here
        },
    ],
];
$container = new RKA\ZsmSlimContainer\Container($settings);
$app = new \Slim\App($container);

Alternatively you can also override afterwards if you want to:, (*5)

$container->setAllowOverride(true);
$container['errorHandler'] = function($container) {
    // set-up error handler
};

The Versions

06/02 2016

dev-master

9999999-dev http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

06/02 2016

2.0.0

2.0.0.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

22/12 2015

1.2.0

1.2.0.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

09/10 2015

1.1.0

1.1.0.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

31/08 2015

1.0.2

1.0.2.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

16/07 2015

1.0.1

1.0.1.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager

05/07 2015

1.0.0

1.0.0.0 http://github.com/akrabat/rka-slim-zfsm-container

Integration of ZF's ServiceManager into Slim 3

  Sources   Download

BSD-3-Clause

The Requires

 

container slim zend-servicemanager