Class |
Perhaps this?
https://www.codeigniter.com/user_guide/g...ur-library It's not limited to just CI resources, you can call your own libraries and methods using the same instance.
I'm not sure, but if you have logic that you wish to use across different controllers, perhaps you should put that inside a model. That way you can access that logic from any controller.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Let's say you have a library called Assets.php (in the application/libraries folder), and this class has a method called create_header() which returns a string.
In your controller: PHP Code: $this->load->library('assets'); Is this the information you were looking for? |
Welcome Guest, Not a member yet? Register Sign In |