Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

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

Zend Framework: Zend_Acl update - Dynamic loading and Zend_Config integration Component Proposal

Proposed Component Name Zend_Acl update - Dynamic loading and Zend_Config integration
Developer Notes update - Dynamic loading and Zend_Config integration
Proposers Aldemar Bernal
Revision 1.0 - 17 November 2007: Proporsal created. (wiki revision: 11)

Table of Contents

1. Overview

Zend_Acl update isn't meant to be a replacement of the current good implementation of Zend_Acl, it is just an update proporsal based on get better performance in the component in medium/large ACL implementations as well a new feature that allows Zend_Acl being created based on a Zend_Config object.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This update will boost performance in medium/large Acl Implementations.
  • This update will allow the component to load only the needed Roles/Resources.
  • This update will allow to load the ACL from a Zend_Config object.

4. Dependencies on Other Framework Components

  • Zend_Acl
  • Zend_Role
  • Zend_Resource
  • Zend_Acl_Exception
  • Zend_Config_Xml

5. Theory of Operation

Dynamic Loading

This update doesn't make any change in current Zend_Acl implementations, it includes only a new method called registerLoader in the Zend_Acl component and a new abstract class called Zend_Acl_Loader_Abstract. The main object of this new feature is to be able to load dynamically Roles and Resources using an instance of the abstract class. Here an example is given to make clearer the new functionality and its use:

At bootstrap:


So, as you could see in the example above, the Loader class will allow to avoid the problem of loading all ACL at once in bootstrap, and will help to only load the data needed.

Zend_Config integration

This is just an additional add-on in the constructor method of Zend_Acl where a Zend_Config object can be use to also dynamic load ACLs.


at bootstrap:

Since the persistence of the ACL is in the Zend_Config object, there is no need of loading all ACL data into the Zend_Acl after created, it'll also feature dynamic loading but without the implementation of any other class (Zend_Acl_Loader_Abstract extended class).

6. Milestones / Tasks

  • Milestone 1: [DONE] Create ZF Wiki info.
  • Milestone 2: Working prototype and some examples.
  • Milestone 3: Working prototype checked into the incubator supporting use cases.
  • Milestone 4: Unit tests exist, work, and are checked into SVN.
  • Milestone 5: Initial documentation exists.

7. Class Index

  • Zend_Acl
  • Zend_Acl_Loader_Abstract

8. Use Cases

9. Class Skeletons


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.