2009年4月23日星期四

Re: [fw-mvc] Zend_Application document mismatch??

-- Tomoaki Kosugi <kipspro@gmail.com> wrote
(on Thursday, 23 April 2009, 02:28 PM +0900):
> 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?

The second. I'll update the docs before the final release -- thanks for
the report!

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: