• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.