library rapture-container
Rapture Container component
mrjulio/rapture-container
Rapture Container component
- Saturday, November 18, 2017
- by MrJulio
- Repository
- 0 Watchers
- 0 Stars
- 3 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Rapture PHP Container
, (*1)
PHP simple DI container with reflection., (*2)
Requirements
Install
composer require mrjulio/rapture-container
Quick start
$container = Container::instance('namespace'); // optional namespace
// store
$container['request'] = Request::fromGlobals();
// fetch
$container['request']->getUri()->getPath();
// reflection
Container::instance()['\Demo\User']; // runs reflection and caches result
// no reflection on 2nd run
Container::instance()->getNew('\Demo\User'); // get a new instance
About
Author
Iulian N. rapture@iuliann.ro, (*3)
Testing
cd ./test && phpunit
License
Rapture PHP Container is licensed under the MIT License - see the LICENSE file for details., (*4)