Welcome Guest, Not a member yet? Register   Sign In
Extending core classes (like Loader) in Application Packages?
#1

[eluser]aidehua[/eluser]
Is it possible to extend core classes like Loader from an application package?

I've got a package which I autoload like this:

Code:
$autoload['packages'] = array('../shared_packages');

Inside my shared_packages folder I've got

/helpers
/libraries
/views

And these all work fine.

But I've also got a MY_loader.php file which, as it extends the core Loader class, belongs in a /core folder.

When I place it in the /application/core/ folder, it works as intended.

But I really need it to be in my /shared_packages folder so I can share it across applications.

However, when I place it in /shared_packages/core/MY_loader.php, it does not work: MY_loader is not being loaded, and the default Loader class is used instead.

Is it possible to extend core classes from within an application package like this?





Theme © iAndrew 2016 - Forum software by © MyBB