-
Notifications
You must be signed in to change notification settings - Fork 1
Versioned Libraries
As of Code Igniter v1.4.0, any library can be overridden by a custom one stored within the application/libraries folder. CI uses two different methods for loading libraries.
[h3]System Libraries[/h3] While you can provide your own version of the system-dependent libraries, CI loads the class file directly. This is in contrast to how it loads all other libraries.
[h3]On-demand Libraries[/h3]
Code Igniter comes with various libraries that you can use on-demand. You can also supply your own libraries on a per-application basis. When you request a library, by calling:
[code] $this->load->library('samplelib'); [/code]
CI first checks to see if a [b]method[/b] is defined for loading that library. In this case, it will look for a method called _init_samplelib() within your application controller.
If it doesn't find that, it will search for a file within application/init called "init_samplelib" (with EXT as the extension).