• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending codeigniter


I want to know what is the best method to extend codeigniter and be able to update codeigniter without overriding my own dev.

I mean isolate the core of codeigniter.?

Don't change any files in the core that simple.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

To elaborate on what @InsiteFX said: The "core" files are those found in the "system" directory. When a new version of CI is released it typically means replacing all the files/folders in that directory. So, don't mess with them. If you need to extend or replace any of the "system" files with your own version, or if you want to create your own libraries then follow the guidelines provided by the CI documentation.

The files/folders in the "application" directory don't often need replacement in a upgrade. The "Upgrading from a Previous Version" instructions that accompany each new version will usually make clear what, if any, changes are required in the "application" files.

I think what you are looking for is this:


"Extending Native Libraries"


Don't edit files in the system folder and follow the section here on extending core classes. When you upgrade CI you'll need to check if the methods you've overloaded/redefined have changed and patch them appropriately.

thanks for all answer. I will push a little bit further!

1- I want to be able to update the core
2- I want to add my layer. like my admin management that will be the same for all project. so be able to update/manage git, for this packae, module.
3- the custom layer of each project. git/management

The answer to your "push" is in the documentation links everybody has been providing and this includes how to create your own libraries (a.k.a. package, module). Any custom libraries you create are easily copied into any other project by any means that will deliver files where you want them.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.