The way I do it is, I define an abstract ‘Controller’-class, that does the fetching of the logger (and/or other injectables), and I extend that class for the real controllers.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
|
How to access Logger inside routes with Slim skeleton
|
4 | 2100 | October 3, 2022 | |
|
Use dependencies in classes without injecting it?
|
5 | 2853 | October 8, 2017 | |
|
Logging to App Engine syslog(LOG_ERR, etc
|
3 | 1409 | July 19, 2019 | |
|
Silalahi logger implementation
|
1 | 1116 | December 27, 2016 | |
|
Slim-4 How to get container logger inside routs?
|
4 | 2694 | July 7, 2020 |