Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Loader Improvements Component Proposal

Proposed Component Name Zend_Loader Improvements
Developer Notes Improvements
Proposers Court Ewing
Zend Liaison TBD
Revision 1.0 - 1 January 2008: Initial Draft. (wiki revision: 13)

Table of Contents

1. Overview

The plugin loader and autoloader resources in the Zend_Loader package are currently designed to only work with non-namespaced class names (pre 5.3). These improvements will modify these components to work for both the existing class naming format as well as actual PHP 5.3 namespaces.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will be backwards compatible
  • This component will not change the current workflow when working with the existing package
  • This component will allow traditional and modern namespaces to be used simultaneously for autoloading and pluginloading

4. Dependencies on Other Framework Components

No additional dependencies

5. Theory of Operation

The use of underscores and namespace separators should be fairly interchangeable; at the very least, they can both map directly to a directory structure. The improvements on Zend_Loader_PluginLoader and Zend_Loader_Autoloader_Resource will make it so plugins and resources utilizing namespaces from PHP 5.3 can be used in conjunction with existing infrastructure.

6. Milestones / Tasks

  • [DONE] Milestone 1: Write proposal
  • [DONE] Milestone 2: Develop use cases
  • [DONE] Milestone 3: Write outline of changes as class skeletons
  • [DONE] Milestone 4: Submit for community review
  • Milestone 5: Gather feedback and apply changes
  • Milestone 6: Write unit tests
  • Milestone 7: Refactor existing classes

7. Class Index

  • Zend_PluginLoader
  • Zend_Autoloader_Resource

8. Use Cases

UC-1: Register PHP 5.3 namespace in autoloader resource
UC-2: Adding a prefix path to pluginloader that maps to a PHP 5.3 namespace

9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 15, 2010

    <p>It looks like the Zend_Loader class supports PHP 5.3 namespaces in ZF v1.10, but the same is not true with pluginloaders and autoloader resources. I'll modify this proposal accordingly.</p>

  2. Jan 15, 2010

    <p>I'm going to work on outlining the changes I'm going to make to each relevant method; I'll update the theory of operation as soon as I'm done.</p>

  3. Jan 27, 2010

    <p>The PluginLoader issues is a real problem, it forced me to use class names like NakedPhp\Mvc\View\Helper_Display, which are really ugly. In what branch this proposal should be implemented? In 1.x already?</p>

    1. Jan 28, 2010

      <p>I've already implemented the changes I described for pluginloader and resource autoloaders, although I haven't completed the unit tests yet. I'm obviously a bit biased, but I think this is the type of change that warrants inclusion as quickly as possible. If it gets accepted, I am prepared to have it ready in time for the next minor release (v1.11 as of this writing).</p>

      <p>Unfortunately, this sort of change creeps through other components as well. For example, while the pluginloader can be modified to support namespaces, Zend_Controller_Action_Helper_Abstract must also be modified slightly in order to support namespaced action helpers.</p>