Welcome Guest, Not a member yet? Register   Sign In
user-library class loading
#4

[eluser]treehousetim[/eluser]
[quote author="sipsniffa" date="1229454223"]
I recently ran into a problem when trying to load my own CodeIgniter library. I initially posted a query to the 'Code and Application' forum and finally posted on what may be a bug. The problem was related to the use of the 'subclass_prefix' configuration option and its possible misuse in the CI code base or missing documentation.

The problem is caused by trying to load a user-library (placed in application/libraries/) without assigning a value to the 'subclass_prefix' configuration option (i.e. 'subclass_prefix' took the default, empty string value). This results in user library classes being deemed attempts to subclass CodeIgniter library classes ...[/quote]

I just solved this for my Page library ( application/Libraries/Page.php ) by putting this line at the top of the file

Code:
class CI_Page extends Page {}

It's not ideal but it keeps me from modifying the CI core which is helpful.

Sad


Messages In This Thread
user-library class loading - by El Forum - 12-16-2008, 07:03 AM
user-library class loading - by El Forum - 12-16-2008, 07:22 AM
user-library class loading - by El Forum - 12-16-2008, 07:55 AM
user-library class loading - by El Forum - 03-21-2009, 05:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB