Injector can invoke methods or create objects resolving their dependencies from a PSR-11 container via autowiring. It can:
- Invoke callable or create an object of a given class.
- Resolve dependencies by parameter types using the given PSR-11 container.
- Pass concrete dependency instances by type.
- Pass arguments by name.
As one of the central parts of Yii 3 it is what does all the auto-wiring into action handlers and widgets.
Since is a framework-independent package, it can be used in any PHP project.