Welcome Guest, Not a member yet? Register   Sign In
Nested Controllers in CodeIgniter
#1

[eluser]Unknown[/eluser]
I have my problem ticket application which have ticket metadata and ticket sections (which are derived based on ticket type).

I have a TicketController for Ticket Metadata which is the main controller.

For each section I have created Controller which implements an interface which have common functions used by each ticket section. Each section will have the model and View file.

Now the idea is to use TicketController as it is the main Controller of the Ticket Screen and based on ticket type, call Ticket Section Controllers to perform common operations that each section have e.g. load section data, save section data etc.

Can somebody suggest me that is this the correct way of doing this?

I know the immediate issue I have is that the auto-load files I get loaded in TicketController are not available to Section Controller when I try to retrieve section data via Section Model file which runs SQL on DB using DB Class that is autoloaded. Any help will be appreciated. Thanks.
#2

[eluser]Uno*[/eluser]
Read http://philsturgeon.co.uk/blog/2010/02/C...ing-it-DRY




Theme © iAndrew 2016 - Forum software by © MyBB