Hi everyone,
I was wondering if it was a bad idea to use Zend_Loader_Autoloader_Resource
with a basePath pointing at my 'application' directory. I use a non-modular
directory structure, like so :
application/
application/models
application/forms
application/controllers
application/views
I want to have a common namespace for my models and forms, so I thought I
could do something like this in my application/Bootstrap.php file :
$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath' => APPLICATION_PATH,
'namespace' => 'My',
));
$resourceLoader->addResourceType('form', 'forms/', 'Form')
->addResourceType('model', 'models/');
APPLICATION_PATH is of course defined in index.php and is pointing at my
application/ directory.
But, is it a bad practice to create a resource autoloader with the
application/ directory ?
Thanks.
Regards,
Gabriel.