php - Can I extend the codeigniter core system, to use my custom functions on multiple sites? -


i using codeigniter support 1 site, main purpose display multiple editable tablekit tables, , handle ajax arrives when edit them. kind of phpmyadmin [very] lite. has number of core helpers , controllers, run main workings of site, mixed in site specific controllers , helpers.

i restructure site can reuse core code-base in site. however, still have default controller functions , cutsom functions in same controller; i.e. in system file somewhere:

class my_core extends controller{     /*       lots of base functions     */ } 

and on 1 site:

class site_1 extends my_core{     /*        site specific functions     */ } 

then on other site:

class site_2 extends my_core{     /*        site specific functions     */ } 

does have guidance on how can this?

thanks,

lemiant

if using codeigniter 2.0 can achieve of with packages. let load helpers, libraries , models anywhere, in each application configure package loaded shared folder.

as core libraries (which my_controller be) have implement own __autoload() function:

http://php.net/manual/en/language.oop5.autoload.php

you can put autoloader @ bottom of config.php. long checking correct folders (local first, shared folder structure) should work pretty nicely.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -