Welcome Guest, Not a member yet? Register   Sign In
Class Destructor usage in a Controller - can anyone see problems
#1

[eluser]jdav3579[/eluser]
Hi,

I have code that is repeated of loading a frame view or wrapper view at the end of each controller method which is passed the data for the page.

I want to define page content in a variable by each controller and then write a single destructor that will just load the appropriate wrapper view and put the data in it.
Can anyone see a problem with doing this? I currently define the data as a constant and use a hook to put the data in.

I would also prefer if the above is possible to put it all into a MY_Controller, so the code is written once for all constructors that extend the class.

Is this possible /Wise?

Cheers
John




Theme © iAndrew 2016 - Forum software by © MyBB