Welcome Guest, Not a member yet? Register   Sign In
Best way to create global functions for modules
#1

[eluser]opel[/eluser]
I am new to Codeigniter and trying to move my home brewed OOP CMS into a more formal format. In my system I had an Admin sub class that processed the add/edit delete functions for each page such as news, links etc.

I am using the excellent HMVC library to make each of my parts of the site into modules each with an admin controller to process the functionality of that module e.g. blog/admin/add

My questions is what is the best way to make a global controller to pass the functions to all my modules ?

Should I :

1. Create a "Global" Module that has my CRUD functionality and load it into each module as required.

or

2. Should I create a library, although still new to CI to understand this fully, and autoload it ?

THanks for the advice in advance
#2

[eluser]Michael Wales[/eluser]
1. Create a library
2. yes




Theme © iAndrew 2016 - Forum software by © MyBB