Download the PHP package geekish/slimbox without Composer
On this page you can find all versions of the php package geekish/slimbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geekish/slimbox
More information about geekish/slimbox
Files in geekish/slimbox
Package slimbox
Short Description Slim Framework with Unbox container
License MIT
Homepage https://github.com/geekish/slimbox
Informations about the package slimbox
Slimbox
Bringing Slim Framework.
Install
Via Composer:
Usage
Service Provider
The most important class in this package is Geekish\Slimbox\DefaultServicesProvider
.
It ensures the same services required by Slim are available through Unbox.
Besides the change in container, it differs from Slim\DefaultServicesProvider
by registering services under their FQCN first, then registers aliases by their interfaces, and finally the short aliases used by slim (e.g. "router", "foundHandler"). Registering services by their class name enables Unbox to automatically inject them as dependencies as needed by other classes.
The service provider is not automatically registered for you, so you need to do this yourself:
Settings
Also included is Geekish\Slimbox\Settings
, which extends from Slim\Collection
. This class replaces the simple array that Slim registers under "settings" (see: Slim Default Settings).
Settings may be provided via the constructor of the DefaultServicesProvider
:
Or via the configure()
method on ContainerFactory
:
Container and Container Factory (Optional)
This package contains an extended (final) Container and ContainerFactory from ArrayAccess. This allows you to use the Container like an array to access services; however, due to the fact that Unbox uses a factory class to create the container, you cannot use array notation to set/configure services on the Container.
To use the extended ContainerFactory:
Usage of the packaged Container
and ContainerFactory
is entirely optional; they are included purely for convenience and consistency with Slim's packaged Container
. Simply replace Geekish\Slimbox\ContainerFactory
in the snippet above with mindplay\unbox\ContainerFactory
.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Hannah Warmbier
- All Contributors
License
The MIT License (MIT). Please see License File for more information.