Welcome Guest, Not a member yet? Register   Sign In
Controller within Controller Issue
#7

Quote:In CodeIgniter 2.2.0 I was able to create a Controller object inside a Controller.

Yeah, don't do that. It's a really bad anti-pattern for a framework like CodeIgniter.

Instead, you may want to move the relevant code in the "recipient controller" into a model instead. There is a one-to-one relationship between an HTTP request and a controller, but a one-to-many between controllers and models.

This may change in future versions, but for 2.2 and 3.0-develop as currently implemented, that's how it is.
Reply


Messages In This Thread
Controller within Controller Issue - by Hideauze - 01-12-2015, 05:13 PM
RE: Controller within Controller Issue - by sarciszewski - 01-14-2015, 08:27 AM
RE: Controller within Controller Issue - by Narf - 02-04-2015, 05:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB