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
JLoader/jimport question in 1.5RC4
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Dec 27, 2007 6:40 pm
Re: JLoader/jimport question in 1.5RC4
You never need to load classes with multiple names like JFooBar. I'm writing something for our blog, keep an eye on http://blog.joomlatools.org
Joomlatools Team Member - DOCman Lead Developer
http://www.joomlatools.org
Read the blog!
http://blog.joomlatools.org
http://www.joomlatools.org
Read the blog!
http://blog.joomlatools.org
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Dec 27, 2007 6:40 pm
Re: JLoader/jimport question in 1.5RC4
mjaz wrote:You never need to load classes with multiple names like JFooBar. I'm writing something for our blog, keep an eye on http://blog.joomlatools.org
Hmm, ok. Already read the blog religiously, I'll look forward to the full response. Thanks!
-- dNb
Re: JLoader/jimport question in 1.5RC4
Joomlatools Team Member - DOCman Lead Developer
http://www.joomlatools.org
Read the blog!
http://blog.joomlatools.org
http://www.joomlatools.org
Read the blog!
http://blog.joomlatools.org
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Dec 27, 2007 6:40 pm
Re: JLoader/jimport question in 1.5RC4
Super answer! Thanks so much for taking the time to write this.
-- dNb