2015-06-16 07:37:57 +00:00
|
|
|
Static providers
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Static providers are family of providers that return their values "as is".
|
|
|
|
There are four types of static providers:
|
|
|
|
|
2015-09-02 15:16:25 +00:00
|
|
|
- ``di.Class``
|
|
|
|
- ``di.Object``
|
|
|
|
- ``di.Function``
|
|
|
|
- ``di.Value``
|
2015-06-16 07:37:57 +00:00
|
|
|
|
|
|
|
All of them have the same behaviour, but usage of anyone is predicted by
|
|
|
|
readability and providing object's type.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2015-08-03 12:57:06 +00:00
|
|
|
.. literalinclude:: ../../examples/providers/static.py
|
|
|
|
:language: python
|