v-dem / queasy-container
PSR-11 container implementation, part of QuEasy PHP framework
v1.0.1
2025-09-07 14:16 UTC
Requires
- php: >=5.3.0
- psr/container: ~1
Requires (Dev)
- ext-xdebug: *
- phpunit/phpunit: ~10
Provides
- psr/container-implementation: 1.0.0
README
QuEasy PHP Framework - Service Container
Package v-dem/queasy-container
Lightweight implementation of PSR-11 Container Interface
Requirements
- PHP version 5.3 or higher
Installation
composer require v-dem/queasy-container
Usage
Initialization
Each item in array passed to ServiceContainer
constructor should be callable which returns instance of of requested service.
$container = new queasy\container\ServiceContainer([ 'logger' => function($container) { return new queasy\log\Logger([ 'path' => __DIR__ . '/logs/debug.log' ]); } ]); $container->logger->debug('Test');