• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to have multiple parent controllers

#1
[eluser]opel[/eluser]
I have managed to get the agency I work for to try out Codeigniter and using it on a number of projects but our 4 developers (including myself) can't agree on the best (cleanest and most efficient way) of having multiple parent controllers.

What we are trying to do is have a parent controller for frontend, admin and in some occasions member/client areas so in all 3 controllers with sub controllers that extend each. The purpose is to pass global information such as navigation, footer info and sessions etc withough having to included it in each controller.

The 3 different things we have tried :

1. I propsed using HMVC and the hooks which was successfull although required switch statement and rest of team werent keep on using a 3rd party code that was no longer supported.

2. We extended controller with My_Controller functionality for admin area but then put front_controller in the "controllers" directory and extended from it using a require statement ata top of each sub controller, decided this could be neater. One of the team added to the system/codeigniter.php file which was messy and would be a problem if we updated.

3. Was to create a library for each which seems ok idea but not sure if it a best practice.

Please could anyone give advice or tips ?


Messages In This Thread
Best way to have multiple parent controllers - by El Forum - 05-02-2009, 06:10 PM
Best way to have multiple parent controllers - by El Forum - 05-02-2009, 06:13 PM
Best way to have multiple parent controllers - by El Forum - 05-02-2009, 06:16 PM
Best way to have multiple parent controllers - by El Forum - 05-02-2009, 07:51 PM
Best way to have multiple parent controllers - by El Forum - 05-02-2009, 10:57 PM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 02:52 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 04:26 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 04:39 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 04:49 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 05:37 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 06:24 AM
Best way to have multiple parent controllers - by El Forum - 05-03-2009, 10:55 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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