JLoader/jimport question in 1.5RC4
Posted: Thu Dec 27, 2007 10:05 pm
Hi-
I'm trying to understand what I think is probably a pretty simple question. I'm wondering what the canonical Joomla way is to import classes found deep in the standard library directories. For example, let's say you want to use JSessionStorageDatabase found in libraries//joomla/session/storage/database.php.
I would have guessed one would be able to use jimport("joomla.session.storage.database") to make use of the spiffy autoloading/performance improvements detailed here: http://forum.joomla.org/index.php?topic=225224.0. But lots of careful single-stepping through the JLoader classes in loader.php has convinced me that jimport doesn't handle things this way. It looks like jimport("joomla.session.storage.database") would happily let me import a class called JDatabase (since the name is constructed using the last part of the specification) but beyond that I'm out of luck and have to resort to the standard PHP functions. Is this the case, or am I missing something?
Thanks for any help you can offer.
-- dNb
I'm trying to understand what I think is probably a pretty simple question. I'm wondering what the canonical Joomla way is to import classes found deep in the standard library directories. For example, let's say you want to use JSessionStorageDatabase found in libraries//joomla/session/storage/database.php.
I would have guessed one would be able to use jimport("joomla.session.storage.database") to make use of the spiffy autoloading/performance improvements detailed here: http://forum.joomla.org/index.php?topic=225224.0. But lots of careful single-stepping through the JLoader classes in loader.php has convinced me that jimport doesn't handle things this way. It looks like jimport("joomla.session.storage.database") would happily let me import a class called JDatabase (since the name is constructed using the last part of the specification) but beyond that I'm out of luck and have to resort to the standard PHP functions. Is this the case, or am I missing something?
Thanks for any help you can offer.
-- dNb