Download the PHP package neunerlei/container-autowiring-declaration without Composer
On this page you can find all versions of the php package neunerlei/container-autowiring-declaration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neunerlei/container-autowiring-declaration
More information about neunerlei/container-autowiring-declaration
Files in neunerlei/container-autowiring-declaration
Package container-autowiring-declaration
Short Description A declaration library to extend PSR-11 for dynamic auto-wring based on interfaces
License Apache-2.0
Informations about the package container-autowiring-declaration
ABANDONED/DEPRECATED
This package should no longer be used and removed from code sources. It is deprecated without replacement.
PSR-11 Autowiring Declaration
This package contains some interfaces to extends the PSR-11 Container definition with auto-wiring hints based on interfaces.
The goal is, to describe classes for a container implementations by interfaces and not via configuration files.
Installation
Install this package using composer:
Interfaces
SingletonInterface
Any class that implements this interface MUST be handled as singleton, this means that every time it is requested from the container, the same instance will be returned.
InjectableInterface
Every class that implements this interface MUST be scanned by the auto-wirer.
- All public methods that start with "inject" MUST automatically be wired as setters of additional dependencies.
- An inject method CAN either have a single or multiple properties to be injected.
- If an inject method does not have any properties it MUST be skipped without errors.
AutoWiringExceptionInterface
Any auto-wiring related exception MUST implement this interface
Definition Interfaces
This section is a secondary definition which defines an interchange format of auto-wiring configuration definitions. Using these interfaces you are able to create a universal auto-wiring handler.
AutoWiringDefinitionProviderInterface
The main repository that creates and stores auto wiring definitions for the classes of you application. The auto-wirer MUST get it's definitions using the definition provider.
AutoWiringClassInterface
Describes the auto wiring definition of a single class.
AutoWiringMethodInterface
Describes the auto wiring definition of a single method inside a class.
AutoWiringParameterInterface
Describes the auto wiring definition of a single parameter of a method inside a class.
Postcardware
You're free to use this package, but if it makes it to your production environment I highly appreciate you sending me a postcard from your hometown, mentioning which of our package(s) you are using.
You can find my address here.
Thank you :D