Welcome Guest, Not a member yet? Register   Sign In
Packages - Replacing Native Libraries

(This post was last modified: 03-22-2015, 12:50 PM by ircdirk.)

As i load third_party package which have third_party/{some package name}/libraries/Profiler.php in it, it does not replace native profiler library.

Is this behaviour intended?

(This post was last modified: 03-23-2015, 02:06 AM by sotavento.)

I think you can't overwrite core libaries with 'third-party' directory.

In the CI 3 doc :

Quote:Replacing Native Libraries with Your Versions
Simply by naming your class files identically to a native library will cause CodeIgniter to use it instead of the native one. To use this feature you must name the file and the class declaration exactly the same as the native library. For example, to replace the native Email library you’ll create a file named application/libraries/Email.php


I had the same problem and rewrite my library profiler in application/libraries/Profiler.php. Now, everything works fine.

(This post was last modified: 03-23-2015, 02:31 AM by ircdirk.)

I'have analyzed Loader.php and Replacing Native Libraries only works in APPPATH/libraries.

But the question is should packages have ability to overwrite native libraries? This would be usefull, as we could write packages that may overwrite every aspect of CI and use them between many CI apps... What do u think?

Theme © iAndrew 2016 - Forum software by © MyBB