Download the PHP package crishellco/rivet-ioc without Composer
On this page you can find all versions of the php package crishellco/rivet-ioc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crishellco/rivet-ioc
More information about crishellco/rivet-ioc
Files in crishellco/rivet-ioc
Package rivet-ioc
Short Description A simple auto-wiring IoC container for PHP
License MIT
Informations about the package rivet-ioc
RivetIoc
RivetIoc is an auto-wiring (zero configuration) IoC container for PHP to easily manage class dependencies. It features both auto-wiring of dependencies using reflection as well as manual registration for depenency injection.
Features
- Auto-wiring (zero configuration) dependency injection
- Recursive dependency injection
- Manual registration for more complex dependency management
- Locator trait which exposes commonly used RivetIoc\Ioc methods
Getting Started
Install
`
System Requirements
PHP >= 5.4.0
Documentation
Auto-wiring
Define your classes using type hints
``
Use RivetIoc to create a new class instance
RivetIoc will use constructor type hints to automatically create and inject dependencies
``
Manual dependency registration
Register your dependencies in your application bootstrap
``
Use RivetIoc to create a new class instance
RivetIoc will use the registered closure to create and inject dependencies
``
Forget a manually registered dependency
``
Locator trait
Use the RivetIoc\Traits\Locator trait in a class give access to commonly used RivetIoc\Ioc methods:
- make
- register
- forget
``
How to Contribute
Pull Requests
- Fork the RivetIoc repository
- Create a new branch for each feature or improvement
- Send a pull request from each feature branch to the develop branch