Welcome Guest, Not a member yet? Register   Sign In
Load controller as class
#1

[eluser]Unknown[/eluser]
Hello =)

I searching for support about this question:

I want to load controller into another controller. I mean I have a sub-dir of a controller.. with many other controllers in it. For example one controller will be main.php and other is view.php. When you want to log in a user, the html form will send data to main.php. This controller will check data for validation, it will load module to check DB stuff... and then I want to load controller view.php for method which will decide to show an error template or to show logged in menu template. I mean I want to separate controller into several parts..One will be for interface [maybe I want to use console or xml output..] and another one is for main functionality.

In anyway I want to have a lot of controllers in subdir which can interact with each other. or.. "I just want to load controller as a class" ... as you can do it now with libraries..

Any solutions =)? Thnx
#2

[eluser]sikkle[/eluser]
Hi Holms, you solution is totally fitting with the HMVC goal.


http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/

That will make you possible to create module, that you gonna call directly inside any other stuff like a library.

Good luck with your stuff.




Theme © iAndrew 2016 - Forum software by © MyBB