Zend Framework

Zend_Application_Resource_Modules Example is wrong

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.9.2
  • Component/s: Zend_Application
  • Labels:
    None

Description

The Example (4.4) under 4.6.3 Zend_Application_Resource_Modules describes how to set some extra configuration per module.
In the example the layout is set for the news module:

news.resources.layout.layout = "news"

The example gives the impression that you can set up things like layout and db per module, but as I pointed out in ZF-7089, module resources will always overwrite the default resources.

After Matthew's explanation in ZF-7089, I understand that this is expected behaviour. Module bootstraps are always loaded, for instance to set up routes prior to dispatch. They should not be used for setting up per-module resources.

I think the documentation should reflect this.

Issue Links

Activity

Hide
Matthew Weier O'Phinney added a comment -

You can load module-specific resources. As noted, however, perhaps using "layout" as an example in the manual was a bad idea. For cases where the application bootstrap has already defined the resource, you should define a new resource in order to prevent collisions.

I'll update the documentation accordingly.

Show
Matthew Weier O'Phinney added a comment - You can load module-specific resources. As noted, however, perhaps using "layout" as an example in the manual was a bad idea. For cases where the application bootstrap has already defined the resource, you should define a new resource in order to prevent collisions. I'll update the documentation accordingly.
Hide
Matthew Weier O'Phinney added a comment -

Removed the layout key from the examples; will release with 1.9.2.

Show
Matthew Weier O'Phinney added a comment - Removed the layout key from the examples; will release with 1.9.2.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: