Welcome Guest, Not a member yet? Register   Sign In
code in controller destruct
#1

[eluser]Unknown[/eluser]
Is it generally considered a bad practice to put necessary code in the __destruct function?

Basically, every controller of mine has several function calls and other housework that needs to be done at the very end of processing (such as saving cookie data, updating views, and so on).

But, from my knowledge, the destructor isn't always called, so I'd need to have every controller function call __destruct, but this seems a bit hackish. Is there a better way I can go about getting my controller functions to do something similar without messing around with destruct?


Messages In This Thread
code in controller destruct - by El Forum - 10-21-2008, 10:26 AM
code in controller destruct - by El Forum - 10-21-2008, 11:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB