Zend Framework: Zend_Config_DomXml Component Proposal
| Proposed Component Name | Zend_Config_DomXml |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Config_DomXml |
| Proposers | silvan@liip.ch |
| Revision | 1.0 - 25 March 2008: Initial proposal. 1.1 - 25 May 2008: added new usecases, updated prototype. (wiki revision: 13) |
Table of Contents
1. Overview
This proposal suggests Zend_Config_DomXml as a Zend_Config adapter similar to Zend_Config_Xml with the difference to use the DOM Xml extension instead of simplexml to parse the configuration files. In addition, it adds support for attributes on configuration nodes as well as it allows the definition of multiple configuration nodes of the same name.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will not change the behaviour known from Zend_Config_Xml
- This component will add support for xincludes/xpointers within the xml configuration file.
- This component will support attributes on configuration nodes.
- This component will allow multiple configuration nodes of the same name
4. Dependencies on Other Framework Components
- Zend_Exception
5. Theory of Operation
Zend_Config_DomXml is similar to Zend_Config_Xml but utilises the DOM XML extension for parsing the configfile. The main advantage of dom compared to simplexml is the ability to use xincludes/xpointers within the configuration file. Additionally the constructor can take an already prepared Domdocument instance instead of a filename as the first argument. Besides of that, Zend_Config_DomXml should mimic the behaviour of Zend_Config_Xml pretty much.
6. Milestones / Tasks
- Milestone 1: [DONE] Proposal finished
- Milestone 2: [DONE] Working prototype checked into https://svn.liip.ch/repos/public/zend/contrib/library/Zend/Config/DomXml.php
- Milestone 3: Unit tests exist, work, and are checked into SVN.
- Milestone 4: Initial documentation exists.
7. Class Index
- Zend_Config_DomXml
8. Use Cases
| UC-01 |
|---|
Using xinclude to include a section from a different configuration file:
| UC-02 |
|---|
Using attributes
| UC-03 |
|---|
Using attributes with multiple nodes of the same name
| UC-04 |
|---|
Using attributes on nodes containing a value as well
ZF Home Page
Code Browser
Wiki Dashboard