Skip to end of metadata
Go to start of metadata
New Proposal Template
This page has been created from a template that uses "zones." To proceed:
  1. Edit the page
  2. Replace sample content within each zone-data tag with your own content
  3. Remove this notice
  4. Save the page
  5. When you are ready for community review, move this page to the Ready for Review section on the edit page.
No placeholders allowed!
Please do not create placeholders. Wait until you have sufficient content to replace all sample data in the proposal template before creating your proposal document.

Zend Framework: Zend_Archive Component Proposal

Proposed Component Name Zend_Archive
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Archive
Proposers Pieter Kokx
Zend Liaison TBD
Revision 1.0 - 1 January 2008: Initial Draft. (wiki revision: 8)

Table of Contents

1. Overview

Zend_Archive is a component that will be able to read and write archives.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • Zend_Archive will be able to read and edit archives.
  • Zend_Archive will be able to create new archives.

4. Dependencies on Other Framework Components

  • Zend_Exception
  • Zend_Loader_PluginLoader

5. Theory of Operation

This component will first read all the metadata from an archive. When requested, it will open a specific file or

6. Milestones / Tasks

  • Milestone 1: [DONE] Create the proposal
  • Milestone 2: Initial class design
  • Milestone 3: Submit the proposal for community review
  • Milestone 4: Create working prototype
  • Milestone 5: Create code-covering unit tests.

7. Class Index

  • Zend_Archive
  • Zend_Archive_Tar
  • Zend_Archive_Gzip
  • Zend_Archive_Zip
  • Zend_Archive_Bz2
  • Zend_Archive_Abstract

8. Use Cases

UC-01

Opening and extracting an existing archive.

UC-02

Create an archive and save it to a directory

9. Class Skeletons

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 09, 2008

    Maybe a method to return instead of save, would be handy.

    1. Jun 09, 2008

      Do you mean that if you are using UC-01, that you can do something like this:

      Well, that is possible, and it is a good idea.

      1. Jun 10, 2008

        No, I mean:

        1. Oct 25, 2008

          Well, that is also possible. And it is not that hard.

  2. Nov 05, 2008

    Pieter, how is this component comming along? I would like to see it in the 1.8 release.

  3. Nov 18, 2008

    Important for ZIP
    PASSWORD for extract and add
    it's very usefull method don't forget it.

    <?php
    $zip = Zend_Archive::factory('zip', Zend_Archive::NEW);
    // will create an instance of Zend_Archive_Zip

    $zip->addDirectory('path/to/directory', 'internal/path/to/directory');

    // do a password string for creating in archive .....
    $zip->addFile('path/to/file.ext', 'internal/path/to/file.ext', 'password string 444');

    $zip->save('path/to/packing/directory');

  4. Dec 18, 2008

    Maybe you could add a few constants:

    And then add an optional argument to the extract method:

    1. Dec 19, 2008

      Thanks for the tip, i will add it to my proposal .

  5. Feb 05, 2011

    Archiving this proposal, feel free to recover it when you want to work on it again. For more details see this email.