Sorry Aleksey but I thought it would register itself automatically, in fact, according to the current documentation:
"Resource autoloaders register with the autoloader on instantiation, with the namespace to which they are associated. [...]" I'll try to register it anyway, sometimes the dumbest thing possible usually works. Thanks for the advice, I'll let you know On Mon, Feb 15, 2010 at 10:12 AM, Aleksey Zapparov <[email protected]> wrote: > Hello, > > Zend_Loader_Autoloader_Resource does not register itself as autoloader. > You have to either specify it as autoloader manually (which in context > of framework is not a good idea) or register it with Zend_Loader_Autoloader > something like this: > > $resource_loader = new Zend_Loader_Autoloader_Resource(...); > Zend_Loader_Autoloader::getInstance()->pushAutoloader($resource_loader); > > > 2010/2/15 Andrea Turso <[email protected]>: >> Hi people, I'm struggling to make Resource Autoloading work with >> Zend Framework 1.10.0 >> >> I created a blank project and started putting some code inside a controller >> created all the needed classes and configured my resources. >> >> The application directory structure is pretty standard: >> >> application/ >> `· services/ >> `· models/ >> `· controllers/ >> >> The index.php is the one generated by Zend_Tool. >> I added these line in my application Bootstra.php >> >> new Zend_Loader_Autoloader_Resource( >> array( >> 'basePath' => APPLICATION_PATH, >> 'namespace' => 'My', >> 'resourceTypes' => array( >> 'service' => array( >> 'path' => 'services', >> 'namespace' => 'Service', >> ), >> 'model' => array( >> 'path' => 'models', >> 'namespace' => 'Model', >> ), >> ), >> ) >> ); >> >> But when I run the application from my browser it keeps spitting out a >> fatal error >> because it can't find the My_Service_SomeService class. >> >> Warning: Zend_Loader::include_once(My/Service/SomeService.php) [...] >> /Development/Zend/Loader.php on line 146 >> >> Fatal error: Class 'My_Service_SomeService' not found in >> /home/trashofmasters/Development/my/application/controllers/IndexController.php >> on line 46 >> >> Ah, what a hell of headache... I always struggled with this damned >> autoloaders lol. >> >> Any suggestions? Searching in the mailing lists didn't seem to give >> interesting results. >> >> Thanks in advance, >> Andrea >> > > > > -- > Sincerely yours, > Aleksey V. Zapparov A.K.A. ixti > FSF Member #7118 > Mobile Phone: +34 617 179 344 > Homepage: http://www.ixti.ru > JID: [email protected] > > *Origin: Happy Hacking! >
