Download the PHP package franco2911/avresticontainer without Composer
On this page you can find all versions of the php package franco2911/avresticontainer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download franco2911/avresticontainer
More information about franco2911/avresticontainer
Files in franco2911/avresticontainer
Package avresticontainer
Short Description Lightweight and flexible Inversion of Control (IoC) container for PHP
License MIT
Informations about the package avresticontainer
AvrestiContainer
AvrestiContainer is a lightweight and flexible dependency injection (DI) container for PHP. It allows you to manage class dependencies and perform dependency injection in a simple and intuitive way.
Features
- Simple Binding: Bind classes and interfaces to concrete implementations.
- Singletons: Register and resolve singletons easily.
- Method Injection: Inject dependencies into class methods.
- Aliases: Create aliases for bindings to simplify dependency resolution.
- Dependency Resolution: Automatically resolve and inject class dependencies.
- Configurable Definitions: Add multiple definitions in a single call using
addDefinitions
. - Autowiring: Automatically resolve class dependencies without explicit bindings.
Installation
You can install AvrestiContainer via Composer:
Usage
Basic Usage
Here's a basic example of how to use AvrestiContainer:
Using Singletons
Register and resolve singletons:
Adding Definitions
You can add multiple definitions using addDefinitions
:
Using Aliases
Create and use aliases for bindings:
Autowiring
AvrestiContainer can automatically resolve class dependencies:
License
This library is licensed under the MIT License. See the LICENSE file for details.
Contributing
We welcome contributions! Please feel free to submit a pull request or open an issue on GitHub.
Acknowledgements
Inspired by various PHP DI containers, AvrestiContainer aims to be a simple yet powerful tool for managing dependencies in PHP applications.
Contact
For any questions or inquiries, please create an issue on GitHub.