Zend Framework: Zend_Directory and Zend_File Component Proposal
| Proposed Component Name | Zend_Directory and Zend_File |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Directory and Zend_File |
| Proposers | Steven Brown |
| Zend Liaison | TBD |
| Revision | 1.0 - 16 August 2009: Initial Draft. (wiki revision: 4) |
Table of Contents
1. Overview
Zend_Directory provides object-oriented functionality for working with filesystem directories. Zend_File does the same for files. At their core they are wrappers for the existing PHP functions, however they can offer more complex functionality.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will provide filesystem functionality
4. Dependencies on Other Framework Components
- Zend_Exception
5. Theory of Operation
The component will provide wrappers for existing PHP functions where possible.
6. Milestones / Tasks
- Milestone 1: Design notes will be published here
- Milestone 2: Working prototype checked into the incubator supporting use cases
- Milestone 3: Unit tests exist, work, and are checked into SVN.
- Milestone 4: Initial documentation exists.
7. Class Index
- Zend_Directory
- Zend_Directory_Iterator
- Zend_File
8. Use Cases
| UC-01 |
|---|
... (see good use cases book)
5 Comments
comments.show.hideAug 16, 2009
Thomas Weidner
-1
This looks like a duplication of existing SPL functionality.
Where is the additional benefit between using this component and the SPL DirectoryIterator, FilesystemIterator, RecursiveDirectoryIterator or SplFileInfo components
Aug 24, 2009
Steven Brown
Yes it is similar to the SPL functionality and could make use of it (although I believe a lot of the SPL functionality came in PHP 5.3) but also it provides additional functionality for recursive operations.
Aug 24, 2009
Thomas Weidner
SPL is available since 5.0.0. The only difference for 5.3.0 is that you can now no longer turn off this extension. All mentioned interfaces/methods/functions are here since 5.1.2.
Before SPL was enabled per default and it was possible to deactivate it within the config.
As the minimum requirement is 5.2.4 there are no new features regarding directory/file to SPL since that. Many other components are also using SPL and until now there were no problems or issues mentioned regarding deactivated SPL or non available functions.
All I see is a duplication of SPL without any additional benefit.
Aug 24, 2009
Steven Brown
You're right I was looking at FilesystemIteraror and GlobIterator.
Maybe you could give me the chance to flesh out the class skeletons a bit
I can understand how looking at them at the moment they are quite empty, I actually have working classes that do a lot more.
Feb 05, 2011
Dolf Schimmel (Freeaqingme)
Archiving this proposal, feel free to recover it when you want to work on it again. For more details see this email.