07-20-2009, 12:32 AM
|
#4 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Why are you putting display code that is only going to be used in one file in a class? Objects are for core logic and code you want to re-use over and over again. The word "display" in a class almost always means you are doing it incorrectly.
The way I try to look at it is pretending that classes and objects have no access to any sort of HTTP output (echo, print, ect).
Enfernikus, your final way is probably the best method. Just pass the object by reference opposed to value so a new instance is not created.
|
|
|
|