Answer the question
In order to leave comments, you need to log in
The principle of using containers in Slim 3?
Why are containers needed in Slim v3? I reviewed/re-read a lot of documentation and slim-skeletons and still did not fully understand what it is and how it can be useful. So far, the understanding is:
1. To store some global variables/settings available from anywhere.
2. To override error handling notAllowedHandler, notFoundHandler, errorHandler, etc.
What other use cases for these containers can be? I also saw use in the form of middleware (for example, jsonResponse is used here), it is not clear why the middleware itself is not as it is. I would love to see real examples.
Thanks in advance :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question