When I was testing Zend_Application in svn tag 1.8.0b1,
I encounterd a problem with Zend_Application's construct options
The document's example says in Zend_Application-Examples.xml(158):
$application = new Zend_Application(
APPLICATION_ENV,
array(
'resources' => array(
'My_Bootstrap_Resource_View', // full class name; OR
'view', // short name
// ...snip
)
);
But in Zend_Application_Bootstrap_BootstrapAbstract::setOptions
calls registerPluginResource with an option's key as resource.
Thus, it throws an Exception
'Zend_Application_Bootstrap_Exception' with message 'Invalid resource
provided to Zend_Application_Bootstrap_BootstrapAbstract::registerPluginResource'
I set as below. This runs fine.
$application = new Zend_Application(
APPLICATION_ENV,
array(
'resources' => array(
'My_Bootstrap_Resource_View' => array() , // full class name; OR
'view' => array(), // short name
)
);
Which is right to use?
Thanks.
--
Tomoaki Kosugi
没有评论:
发表评论