XOOPS  2.6.0
zipfile Class Reference

Public Member Functions

 addFile ($data, $name, $time=0)
 
 file ()
 
 unix2DosTime ($unixtime=0)
 

Public Attributes

 $ctrl_dir = array()
 
 $datasec = array()
 
 $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"
 
 $old_offset = 0
 

Detailed Description

Definition at line 30 of file class.zipfile.php.

Member Function Documentation

zipfile::addFile (   $data,
  $name,
  $time = 0 
)

Adds "file" to archive

Parameters
string$datafile contents
string$namename of the file in the archive (may contains the path)
integer$timethe current timestamp public

Definition at line 90 of file class.zipfile.php.

References $name, and unix2DosTime().

Here is the call graph for this function:

zipfile::file ( )

Dumps out file

Returns
string the zipped file public

Definition at line 155 of file class.zipfile.php.

zipfile::unix2DosTime (   $unixtime = 0)

Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).

Parameters
integer$unixtimethe current Unix timestamp
Returns
integer the current date in a four byte DOS format private

Definition at line 68 of file class.zipfile.php.

Referenced by addFile().

Here is the caller graph for this function:

Member Data Documentation

array zipfile::$ctrl_dir = array()

Central directory

Definition at line 44 of file class.zipfile.php.

array zipfile::$datasec = array()

Array to store compressed data

Definition at line 37 of file class.zipfile.php.

string zipfile::$eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"

End of central directory record

Definition at line 51 of file class.zipfile.php.

integer zipfile::$old_offset = 0

Last offset position

Definition at line 58 of file class.zipfile.php.


The documentation for this class was generated from the following file: