Feature Request #4173
Request class should lose all singleton methods
| Status: | New | Start date: | 08/03/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Core | |||
| Target version: | v3.4.0 | |||
| Resolution: | Points: | 1 |
Description
The singleton methods within the Request class should be removed, including;
Request::initial()Request::current()
The Request object should be passed into methods/classes that require it using dependency injection. The pre-initialisation that happens in Request::initial() most likely does not belong there and should be moved elsewhere.
History
Updated by Steven G. 9 months ago
Sam de Freyssinet wrote:
The singleton methods within the Request class should be removed, including;
Request::initial()Request::current()The
Requestobject should be passed into methods/classes that require it using dependency injection.
Why does it sound like the code would look exactly the same just with slightly different names.
Updated by Lorenzo Pisani 9 months ago
- Subject changed from Request class should loose all singleton methods to Request class should lose all singleton methods
Steven: sorry, what do you mean?
Updated by Steven G. 9 months ago
Lorenzo Pisani wrote:
Steven: sorry, what do you mean?
For now, I'm just going to wait and see how this works out, or some more details from some on how exactly it's going to be used in some simple situations such as getting the current request in some random function/method/view.
Updated by Isaiah DeRose-Wilson 5 months ago
- Target version changed from v3.3.0 to v3.4.0