Timeline for PHP my way of threating static classes
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 18, 2015 at 16:20 | vote | accept | maximkott | ||
Sep 6, 2013 at 9:24 | comment | added | CodesInChaos | Rule of thumb: If it has mutable state it shouldn't be static | |
S Sep 6, 2013 at 8:51 | history | suggested | Elias Van Ootegem |
add relevant tag
|
|
Sep 6, 2013 at 7:42 | review | Suggested edits | |||
S Sep 6, 2013 at 8:51 | |||||
Jan 7, 2013 at 23:10 | comment | added | maximkott | Read my post below, please. | |
Jan 7, 2013 at 21:27 | comment | added | Corbin | Static classes tend to quickly move you in the exact opposite direction as OOP. I have a feeling that there's a much better way to accomplish what you're doing, but after reading your post 3 times, I'm not quite sure I understand what it is that you are doing. Why do you need to wrap some objects in a static 'shell'? Is it for convenience? Abusing them as globals? Or what? It seems like dependency injection is the right approach here, even if it is less convenient. (Once again though, maybe I'm missing something -- not sure I quite get what the end goal is.) | |
Jan 7, 2013 at 20:19 | answer | added | mseancole | timeline score: 2 | |
Jan 7, 2013 at 14:16 | review | First posts | |||
Jan 7, 2013 at 16:55 | |||||
Jan 7, 2013 at 14:03 | history | edited | maximkott | CC BY-SA 3.0 |
added 56 characters in body
|
Jan 7, 2013 at 13:58 | history | asked | maximkott | CC BY-SA 3.0 |