| Under Construction This proposal is under construction and is not ready for review. |
Zend Framework: Zend_File_Convert Component Proposal
| Proposed Component Name | Zend_File_Convert |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_File_Convert |
| Proposers | Jonathan Bond-Caron |
| Revision | 1.1 - 1 August 2006: Updated from community comments. (wiki revision: 4) |
Table of Contents
1. Overview
Zend_File_Convert is a library that aims to make conversion between file formats simple and efficient. As an example, the initial focus of this proposal will be on an ambitious conversion of XHTML 1.0 (http://www.w3.org/TR/xhtml1/) documents to PDF.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
The first step will consist of creating a factory class that tries to convert file A to file B. Following are list of requirements:
will include a factory method.
will not allow subclassing.
will allow adding file converters
will be able to do automatic detection of the file mime-type
will throw an exception if no valid file converter is found
will not use a cache, this is job of each Zend_File_Converter
4. Dependencies on Other Framework Components
- Zend_Exception
- Zend_File ?
5. Theory of Operation
The Zend file converter will try to find the appropriate converter (Zend_File_Converter) to make the conversion between two files. If will then call the appropriate converter to make the appropriate file conversion. If no valid converter is found, the class will throw an error.
6. Milestones / Tasks
- Milestone 1: Publish proposal.
- Milestone 2: Revise proposal, approve for Incubator development.
- Milestone 3: Commit working prototype to Incubator.
- Milestone 4: Commit working unit tests.
- Milestone 5: Write up a simple Zend_File_Converter implementation to use as an example.
- Milestone 6: Write end-user documentation.
- Milestone 7: Revise implementation, tests, and documentation based on feedback.
- Milestone 8: Merge changes from Incubator to Core.
7. Class Index
- Zend_File_Convert (factory class)
- Zend_File_Converter (abstract class)
- Zend_File_Convert_Exception
8. Use Cases
| UC-01 |
|---|
... (see good use cases book)
2 Comments
comments.show.hideAug 14, 2007
Thomas Weidner
I think "Zend_Convert" should be renamed...
Because Convert implies that I can convert anything with it. Not only files but also values, measurements, currencies or what ever has to be converted.
As you stated that this class will only convert "files", I think it should be renamed to
Zend_File_Convert
Sep 16, 2011
Radu Gasler
Hi Jonathan,
I believe another good use case for this component would be the conversion between different audio and video file formats.