tags:

views:

25

answers:

1

im all new to framework.

so the structure of code igniter looks like:

system system/application

the system folder is code igniter's base folder right? so if they in the future releases a new version i just put application in the new system folder and its upgraded right?

does this mean that i shouldn't put new files and so on in the system folder? cause some code could be used for other applications and i want to put them under the current application im developing, not inside the application folder.

i want my application's classes to extend my base system's classes which in turn extend code igniter's base system class.

so there are 3 levels. so how could i accomplish this? where to put the system level between CI and my application?

+1  A: 

The core framework files are located in SYSTEM/CODEIGNITER.

Your application files are mostly located in SYSTEM/APPLICATION

You can extend CodeIgniter by putting files into SYSTEM/LIBRARIES folder. For example the default prefix for own files extending core framework is MY so you will have my_model.php inside class MY_Model extends Model { then in your SYSTEM/APPLICATION/MODELS you can have user.php and inside the file class User extends MY_Model { This is very basic example. You can read more here - http://codeigniter.com/user_guide/general/creating_libraries.html

Ivo Sabev
ok so when i upgrade to next CI version i have to move all MY_ classes from SYSTEM/LIBRARIES to the new one?
never_had_a_name
Yes. You can change the default extension prefix MY to something else from the config.php so be careful. There are other ways to extend CodeIgniter mentioned in the article I gave you above. But the general case is that you will never change anything inside the SYSTEM/APPLICATION
Ivo Sabev