Download the PHP package tomrf/autowire without Composer
On this page you can find all versions of the php package tomrf/autowire. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomrf/autowire
More information about tomrf/autowire
Files in tomrf/autowire
Package autowire
Short Description autowire dependency injection from PSR-11 containers
License MIT
Homepage http://github.com/tomrf/autowire
Informations about the package autowire
autowire - autowire dependency injection from PSR-11 containers
A simple PHP library that facilitates autowired dependency injection by fetching class constructor dependencies from one or more PSR-11 containers.
Autowire uses the PHP reflection API to peek at constructor parameter types and injects required and optional dependencies from assigned containers.
📔 Go to documentation
Installation
Installation via composer:
Usage
Testing
License
This project is released under the MIT License (MIT). See LICENSE for more information.
Documentation
- Tomrf\Autowire\Autowire
- resolveDependencies
- instantiateClass
- listDependencies
📂 Tomrf\Autowire\Autowire::class
Minimal class that facilitates dependency injection by autowiring class constructor dependencies from one or more PSR-11 containers.
resolveDependencies()
Returns array of resolved dependencies for a class constructor.
Dependencies are resolved from one or more PSR-11 containers.
Throws AutowireException if a required dependency could not be met using available containers.
instantiateClass()
Return a new instance of a class after successfully resolving all required dependencies using provided containers.
Throws AutowireException if the class does not exist or if a required dependency could not be met using available containers.
listDependencies()
Returns an array of all dependencies (method parameters) and relevant attributes for a given class or object/callable.
Generated 2022-06-28T01:41:09+02:00 using 📚tomrf/readme-gen