CodeIgniter Forums
Working with modules - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Working with modules (/thread-14455.html)



Working with modules - El Forum - 01-03-2009

[eluser]Unknown[/eluser]
So I'm thinking about giving the modular side of CI a go, using possibly ME or Matchbox. I've got a question regarding the use of these modules.

Currently, for example, I have a setup like this:

application/controllers/user.php
- login method
- logout method
- register method
- view($id) method
- etc...

For a modular setup, could I do something like:

application/modules/user/controllers/
- login controller
- logout controller
- register controller
- view controller
- etc...

So basically split each current method in the user controller into its own controller by itself. Less code in each file would make things more efficient, I'd imagine, but is this an alright way I can go about this, or is there something I'm overlooking?