(on Friday, 08 May 2009, 09:43 PM -0600):
> I have Zend_Application up and running (upgrading from ver. 1.7), but I am at a
> loss as to how to configure the autoloader that is instantiated within
> Zend_Application. After searching the lists, the only configuration example I
> have found is:
>
> autoload.includeFileCache = ...
>
> In order to setup other namespaces as well as other configurable options using
> the *.ini syntax, what must I do? Sorry if I'm a little dense here, but I'm not
> sure what to do or where to find out how. I would greatly appreciate a push in
> the right direction. Thanks!
Currently, Zend_Application only allows specifying additional autoloader
namespaces. If you want to add more configuration to it, you have two
options:
* Configure it before invoking Zend_Application. Zend_Loader_Autoloader
is a singleton (as autoloading is a global activity), so you can pull
the instance and configure it before invoking Zend_Application.
* Configure it in a resource (plugin or method). Again,
Zend_Loader_Autoloader is a singleton, so you can simply pull the
instance and configure it.
In the latter case, how you specify the options will depend on if you
create a resource plugin class or simply add a method to your bootstrap.
In the former, the keys will be dependent on what you name your
resource, and how you choose to pass options to the autoloader; in the
latter, you only have to worry about what options you will be
configuring.
Now, the includeFileCache you mention is actually related to the
_plugin_ loader, and setting that up is something you should do in a
resource plugin or method.
--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论