Download the PHP package flamecore/container without Composer
On this page you can find all versions of the php package flamecore/container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flamecore/container
More information about flamecore/container
Files in flamecore/container
Package container
Short Description Simple and lightweight Dependency Injection Container
License MIT
Homepage https://www.flamecore.org
Informations about the package container
FlameCore Container
This library provides a simple and lightweight Dependency Injection Container.
Features
-
Interfaces: Extended container interfaces compatible with PSR-11
-
ModifiableContainerInterface
exposes methods to write and remove container entries. -
DefinableContainerInterface
exposes methods to define container entries. -
FactoryContainerInterface
exposes a method to create new object instances from a factory entry. LockableContainerInterface
exposes methods to lock and unlock container entries.
-
-
Classes: Advanced and feature-complete container implementations based on the interfaces
-
Container
implements common features like defining, writing, instantiating and removing container entries. LockableContainer
extends the above container to enable locking and unlocking of container entries.
-
Usage
To make use of the API, include the vendor autoloader and use the classes:
You can use get()
and has()
on the container as usual. You can also set()
and remove()
entries.
You can also use object factories:
You can also get a fallback value if an entry is not set:
Installation
Install Composer if you don't already have it present on your system.
To install the library, run the following command and you will get the latest version:
$ php composer.phar require flamecore/container
Requirements
- You must have at least PHP version 7.2 installed on your system.
Contributors
If you want to contribute, please see the CONTRIBUTING file first.
Thanks to the contributors:
- Christian Neff (secondtruth)