Welcome Guest, Not a member yet? Register   Sign In
Extending codeigniter
#1

Hi,

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.?
Reply
#2

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 )
Reply
#3

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.
Reply
#4

I think what you are looking for is this:

http://www.codeigniter.com/user_guide/ge...-libraries

"Extending Native Libraries"

DMyers
Reply
#5

(This post was last modified: 09-06-2016, 12:37 PM by spjonez.)

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.
Reply
#6

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
Reply
#7

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB