Closed hgati closed 10 years ago
Could you explain a bit more what you did try and what did not work?
Also, did you follow the readme?
If you are trying to use the autoloader in a shell script, please extend the class AutoloaderInitializer (shell/autoloader_initializer.php). The event add_spl_autoloader is our custom event which is fired to initialize the autoloader and is fired in the _construct method of this class.
Ok, I've solved.
I added the code below, when executing in command line mode,(php -f test.php)
Mage::getConfig()->init()->loadEventObservers('global');
Mage::app()->addEventArea('global');
Mage::dispatchEvent('add_spl_autoloader');
Great
as far as I know, there is no the magento event observer such as "add_spl_autoloader". hence, it doesn't work. I'm using magento 1.7.0.2 and I've tried psr0 library https://github.com/technosophos/querypath