Download the PHP package yolo-fx/di without Composer
On this page you can find all versions of the php package yolo-fx/di. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package di
YOLO DI
YOLO DI is a lightweight PHP dependency injection (DI) library designed to simplify the process of managing dependencies, resolving classes, and injecting properties. It provides a static facade for interacting with the DI container, making it easy to bind, resolve, and manage object lifecycles.
Features
- Dependency Resolution: Automatically resolve and instantiate classes with their dependencies.
- Class Binding: Bind interfaces or abstract classes to concrete implementations.
- Instance Management: Manually set or remove specific instances for classes.
- Alias Management: Create and manage aliases for classes.
- Custom Property Injection: Use attributes to inject custom dependencies into class properties.
Installation
To install YOLO DI, use Composer:
Usage
Basic Example
Using Aliases
Custom Property Injection
Define a custom attribute:
Use the attribute in a class:
Requirements
- PHP 8.0 or higher
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
- LUSHAOMING - [email protected]
All versions of di with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
The package yolo-fx/di contains the following files
Loading the files please wait ...