(on Monday, 02 March 2009, 08:28 PM +0200):
> One more question ;)
>
> According to this
>
<snip>
>
> there are defined also plugins. What kind of plugins should be here ?
Front controller plugins -- as in classes extending
Zend_Controller_Plugin_Abstract.
> There are plans to add also filters and helpers for layout or views by default
Those already have locations:
module/
layouts/
filters/
helpers/
scripts/
layout.phtml
views/
filters/
helpers/
scripts/
> Matthew Weier O'Phinney wrote:
>
> -- Cristian Bichis <contact@zftutorials.com> wrote
> (on Monday, 02 March 2009, 04:55 PM +0200):
>
>
> Please remember that Zend_Application is yet to be approved, and that
> the prototype is under active development. For right now, the below is
> (with modifications) how you would go about doing things; however, with
> the final version of Zend_Application, it will likely be much easier.
>
>
>
> protected function _initResources()
> {
> $this->bootstrapFrontController();
> $loaders = array();
> foreach ($this->front->getControllerDirectory() as $module
> => $dir)
> {
> $loaders[$module] = new Zend_Application_Module_Autoloader(
> array(
> 'namespace' => ucfirst($module).'_',
> 'basePath' => dirname($dir),
> ) );
> $loaders[$module]->addResourceType('Model',
> 'models', 'Model');
>
>
> The above line is unnecessary -- Zend_Application_Module_Autoloader
> already defines the 'Model' resource.
>
>
>
> }
> }
>
>
>
>
>
>
> --
> Best regards,
> Cristian Bichis
> www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
>
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论