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