Download the PHP package niirrty/niirrty.pimplewired without Composer
On this page you can find all versions of the php package niirrty/niirrty.pimplewired. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download niirrty/niirrty.pimplewired
More information about niirrty/niirrty.pimplewired
Files in niirrty/niirrty.pimplewired
Package niirrty.pimplewired
Short Description Extends the Pimple DIC with auto wiring features
License MIT
Informations about the package niirrty.pimplewired
Niirrty.PimpleWired
Extends Pimple v3.* with auto wiring features.
Auto wiring means
- Automatic class resolving
- Constructor injection
- Automatic class instantiation
Example
Disable "Auto Resolve"
If you not want to use the auto resolve feature, you can disable it by:
The "Create Args"
This are the parameters, passed/injected as constructor parameters for parameters where NO type hint to a class is declared.
If the constructor of a specific, required class only define params with type hints of classes, there is no need to pass some create args:
But if one or more params not uses a type hint or a type hint to some other no class types
you must "pre define" the required params $something always and $blub optionally
if the class is \Xyz\Baz define it with
'Something value'
is passed to the $something parameter'Optional blub value'
is passed to the $blub parameter
The order must be the same like defined by constructor params!
If there is the need to pass values to params with a type hint class
be free to use it:
Resolve namespaces
If you want to access your classes also without explicit namespace declaration you have to define it as a resolve namespace like:
So no \Xyz\Baz
must be used:
Aliases
Aliases are used to map interfaces to concrete class implementations of the interface.