apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: File_Archive_Writer_Zip

Source Location: /File_Archive-1.5.5/File/Archive/Writer/Zip.php

Class Overview

File_Archive_Writer
   |
   --File_Archive_Writer_Archive
      |
      --File_Archive_Writer_MemoryArchive
         |
         --File_Archive_Writer_Zip

ZIP archive writer


Methods


Inherited Variables

Inherited Methods

Class: File_Archive_Writer_MemoryArchive

File_Archive_Writer_MemoryArchive::File_Archive_Writer_MemoryArchive()
File_Archive_Writer_MemoryArchive::appendFile()
The subclass may rewrite this class if it knows an efficient way to treat a physical file.
File_Archive_Writer_MemoryArchive::appendFileData()
The subclass must treat the data $data $data is the entire data of the filename $filename $stat is the stat of the file
File_Archive_Writer_MemoryArchive::close()
File_Archive_Writer_MemoryArchive::sendFooter()
The subclass may rewrite the sendFooter function if it needs to execute code before closing the archive
File_Archive_Writer_MemoryArchive::sendHeader()
The subclass may rewrite the sendHeader function if it needs to execute code before the first file
File_Archive_Writer_MemoryArchive::writeData()
File_Archive_Writer_MemoryArchive::writeFile()

Class: File_Archive_Writer_Archive

File_Archive_Writer_Archive::File_Archive_Writer_Archive()
File_Archive_Writer_Archive::close()
File_Archive_Writer_Archive::getMime()
File_Archive_Writer_Archive::newFile()

Class: File_Archive_Writer

File_Archive_Writer::close()
Close the writer, eventually flush the data, write the footer...
File_Archive_Writer::newFile()
Create a new file in the writer
File_Archive_Writer::newFileNeedsMIME()
Returns whether the writer newFile function needs the $mime parameter
File_Archive_Writer::newFromTempFile()
Create a new file in the writer with the content of the physical file $filename and then unlink $filename.
File_Archive_Writer::writeData()
Append the specified data to the writer
File_Archive_Writer::writeFile()
Append the content of the physical file $filename to the writer writeFile($filename) must be equivalent to writeData(file_get_contents($filename)) but can be more efficient

Class Details

[line 37]
ZIP archive writer


[ Top ]


Method Detail

File_Archive_Writer_Zip (Constructor)   [line 63]

File_Archive_Writer_Zip File_Archive_Writer_Zip( $filename, &$innerWriter, [ $stat = array()], [ $autoClose = true])


Parameters:

   $filename   — 
   &$innerWriter   — 
   $stat   — 
   $autoClose   — 

[ Top ]

alreadyWrittenFile   [line 120]

void alreadyWrittenFile( string $filename, array $stat, int $crc32, $complength, int $compLength)

Inform the archive that $filename is present.

Consequences are the same as appendFileData, but no data is output to the inner writer. This is used by File_Archive_Reader_Zip::makeWriter()


Parameters:

string   $filename   —  name of the file
array   $stat   —  stats of the file, indexes 9 and 7 must be present
int   $crc32   —  checksum of the file
int   $compLength   —  length of the compressed data
   $complength   — 

[ Top ]

appendCompressedData   [line 154]

void appendCompressedData( $filename, $stat, $data, $crc32, $normlength)


Parameters:

   $filename   — 
   $stat   — 
   $data   — 
   $crc32   — 
   $normlength   — 

[ Top ]

appendFile   [line 188]

void appendFile( $filename, $dataFilename)


Overrides File_Archive_Writer_MemoryArchive::appendFile() (The subclass may rewrite this class if it knows an efficient way to treat a physical file.)

Parameters:

   $filename   — 
   $dataFilename   — 

[ Top ]

appendFileData   [line 144]

void appendFileData( $filename, $stat, $data)

  • See: File_Archive_Writer_MemoryArchive::appendFileData()
  • Access: protected

Overrides File_Archive_Writer_MemoryArchive::appendFileData() (The subclass must treat the data $data $data is the entire data of the filename $filename $stat is the stat of the file)

Parameters:

   $filename   — 
   $stat   — 
   $data   — 

[ Top ]

getMime   [line 257]

void getMime( )

  • See: File_Archive_Writer::getMime()

Overrides File_Archive_Writer_Archive::getMime() (parent method not documented)
[ Top ]

getMTime   [line 93]

the getMTime( int $time)

  • Return: date formated as a ZIP date

Parameters:

int   $time   —  Unix timestamp of the date to convert

[ Top ]

sendFooter   [line 242]

void sendFooter( )

  • See: File_Archive_Writer_MemoryArchive::sendFooter()
  • Access: protected

Overrides File_Archive_Writer_MemoryArchive::sendFooter() (The subclass may rewrite the sendFooter function if it needs to execute code before closing the archive)
[ Top ]

setComment   [line 87]

void setComment( $comment)

Set a comment on the ZIP file

Parameters:

   $comment   — 

[ Top ]

setCompressionLevel   [line 79]

void setCompressionLevel( Int $compressionLevel)

Change the level of the compression. This may be done between two files

Parameters:

Int   $compressionLevel   —  New compression level from 0 to 9

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.