Download the PHP package stanlemon/simple-container without Composer
On this page you can find all versions of the php package stanlemon/simple-container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download stanlemon/simple-container
More information about stanlemon/simple-container
Files in stanlemon/simple-container
Download stanlemon/simple-container
More information about stanlemon/simple-container
Files in stanlemon/simple-container
Vendor stanlemon
Package simple-container
Short Description SimpleContainer is a simple service container with dependency injection.
License MIT
Homepage http://stanlemon.net
Package simple-container
Short Description SimpleContainer is a simple service container with dependency injection.
License MIT
Homepage http://stanlemon.net
Please rate this library. Is it a good library?
Informations about the package simple-container
SimpleContainer
SimpleContainer is a basic service container, it can store key => value objects and lazily load them using Closures. It also includes a newInstance() method which allows you to inject dependencies through constructors and setters providing for very basic dependency injection.
Example usages
Basic loading of services and retrieving of them
// Create the SimpleContainer
$container = new SimpleContainer();
// Set a service
$container->set('foo', function(){
return new Foo();
});
// Get the service
$foo = $container->get('foo');
// Create a new class with services populaed
$bar = $container->newInstance('bar');
$bar->getFoo();
All versions of simple-container with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.3
The package stanlemon/simple-container contains the following files
Loading the files please wait ....