Core_Zip_Pclzip
in package
Implements ZipInterface
Tags
Table of Contents
Constants
- CHECKCONS = 4
- CM_BZIP2 = 12
- CM_DEFAULT = -1
- CM_DEFLATE = 8
- CM_DEFLATE64 = 9
- CM_IMPLODE = 6
- CM_LZ77 = 19
- CM_LZMA = 14
- CM_PKWARE_IMPLODE = 10
- CM_PPMD = 98
- CM_REDUCE_1 = 2
- CM_REDUCE_2 = 3
- CM_REDUCE_3 = 4
- CM_REDUCE_4 = 5
- CM_SHRINK = 1
- CM_STORE = 0
- CM_TERSE = 18
- CM_WAVPACK = 97
- CREATE = 1
- ER_CHANGED = 15
- ER_CLOSE = 3
- ER_COMPNOTSUPP = 16
- ER_CRC = 7
- ER_DELETED = 23
- ER_EOF = 17
- ER_EXISTS = 10
- ER_INCONS = 21
- ER_INTERNAL = 20
- ER_INVAL = 18
- ER_MEMORY = 14
- ER_MULTIDISK = 1
- ER_NOENT = 9
- ER_NOZIP = 19
- ER_OK = 0
- ER_OPEN = 11
- ER_READ = 5
- ER_REMOVE = 22
- ER_RENAME = 2
- ER_SEEK = 4
- ER_TMPOPEN = 12
- ER_WRITE = 6
- ER_ZIPCLOSED = 8
- ER_ZLIB = 13
- EXCL = 2
- FL_COMPRESSED = 4
- FL_NOCASE = 1
- FL_NODIR = 2
- FL_UNCHANGED = 8
- OPSYS_ACORN_RISC = 13
- OPSYS_ALTERNATE_MVS = 15
- OPSYS_AMIGA = 1
- OPSYS_ATARI_ST = 5
- OPSYS_BEOS = 16
- OPSYS_DEFAULT = 3
- OPSYS_DOS = 0
- OPSYS_MACINTOSH = 7
- OPSYS_MVS = 11
- OPSYS_OPENVMS = 2
- OPSYS_OS_2 = 6
- OPSYS_OS_400 = 18
- OPSYS_OS_X = 19
- OPSYS_TANDEM = 17
- OPSYS_UNIX = 3
- OPSYS_VFAT = 14
- OPSYS_VM_CMS = 4
- OPSYS_VSE = 12
- OPSYS_WINDOWS_NTFS = 10
- OPSYS_Z_CPM = 9
- OPSYS_Z_SYSTEM = 8
- OVERWRITE = 8
Properties
- $filename : string
- Archive filename (emulate ZipArchive::$filename)
- $numFiles : int
- Number of files (emulate ZipArchive::$numFiles)
- $_oPclZip : PclZip
- $_tmpDir : string
Methods
- __call() : mixed
- Catch function calls
- __construct() : mixed
- addEmptyDir() : bool
- Add Empty Dir
- addFile() : bool
- Add a new file to the zip archive
- addFromString() : bool
- Add a file to a ZIP archive using its contents
- close() : mixed
- deleteName() : bool
- Delete file from archive by given file name
- getFromName() : string
- Extract file from archive by given file name
- open() : mixed
- pclzipLocateName() : int
- Returns the index of the entry in the archive
Constants
CHECKCONS
public
mixed
CHECKCONS
= 4
CM_BZIP2
public
mixed
CM_BZIP2
= 12
CM_DEFAULT
public
mixed
CM_DEFAULT
= -1
CM_DEFLATE
public
mixed
CM_DEFLATE
= 8
CM_DEFLATE64
public
mixed
CM_DEFLATE64
= 9
CM_IMPLODE
public
mixed
CM_IMPLODE
= 6
CM_LZ77
public
mixed
CM_LZ77
= 19
CM_LZMA
public
mixed
CM_LZMA
= 14
CM_PKWARE_IMPLODE
public
mixed
CM_PKWARE_IMPLODE
= 10
CM_PPMD
public
mixed
CM_PPMD
= 98
CM_REDUCE_1
public
mixed
CM_REDUCE_1
= 2
CM_REDUCE_2
public
mixed
CM_REDUCE_2
= 3
CM_REDUCE_3
public
mixed
CM_REDUCE_3
= 4
CM_REDUCE_4
public
mixed
CM_REDUCE_4
= 5
CM_SHRINK
public
mixed
CM_SHRINK
= 1
CM_STORE
public
mixed
CM_STORE
= 0
CM_TERSE
public
mixed
CM_TERSE
= 18
CM_WAVPACK
public
mixed
CM_WAVPACK
= 97
CREATE
public
mixed
CREATE
= 1
ER_CHANGED
public
mixed
ER_CHANGED
= 15
ER_CLOSE
public
mixed
ER_CLOSE
= 3
ER_COMPNOTSUPP
public
mixed
ER_COMPNOTSUPP
= 16
ER_CRC
public
mixed
ER_CRC
= 7
ER_DELETED
public
mixed
ER_DELETED
= 23
ER_EOF
public
mixed
ER_EOF
= 17
ER_EXISTS
public
mixed
ER_EXISTS
= 10
ER_INCONS
public
mixed
ER_INCONS
= 21
ER_INTERNAL
public
mixed
ER_INTERNAL
= 20
ER_INVAL
public
mixed
ER_INVAL
= 18
ER_MEMORY
public
mixed
ER_MEMORY
= 14
ER_MULTIDISK
public
mixed
ER_MULTIDISK
= 1
ER_NOENT
public
mixed
ER_NOENT
= 9
ER_NOZIP
public
mixed
ER_NOZIP
= 19
ER_OK
public
mixed
ER_OK
= 0
ER_OPEN
public
mixed
ER_OPEN
= 11
ER_READ
public
mixed
ER_READ
= 5
ER_REMOVE
public
mixed
ER_REMOVE
= 22
ER_RENAME
public
mixed
ER_RENAME
= 2
ER_SEEK
public
mixed
ER_SEEK
= 4
ER_TMPOPEN
public
mixed
ER_TMPOPEN
= 12
ER_WRITE
public
mixed
ER_WRITE
= 6
ER_ZIPCLOSED
public
mixed
ER_ZIPCLOSED
= 8
ER_ZLIB
public
mixed
ER_ZLIB
= 13
EXCL
public
mixed
EXCL
= 2
FL_COMPRESSED
public
mixed
FL_COMPRESSED
= 4
FL_NOCASE
public
mixed
FL_NOCASE
= 1
FL_NODIR
public
mixed
FL_NODIR
= 2
FL_UNCHANGED
public
mixed
FL_UNCHANGED
= 8
OPSYS_ACORN_RISC
public
mixed
OPSYS_ACORN_RISC
= 13
OPSYS_ALTERNATE_MVS
public
mixed
OPSYS_ALTERNATE_MVS
= 15
OPSYS_AMIGA
public
mixed
OPSYS_AMIGA
= 1
OPSYS_ATARI_ST
public
mixed
OPSYS_ATARI_ST
= 5
OPSYS_BEOS
public
mixed
OPSYS_BEOS
= 16
OPSYS_DEFAULT
public
mixed
OPSYS_DEFAULT
= 3
OPSYS_DOS
public
mixed
OPSYS_DOS
= 0
OPSYS_MACINTOSH
public
mixed
OPSYS_MACINTOSH
= 7
OPSYS_MVS
public
mixed
OPSYS_MVS
= 11
OPSYS_OPENVMS
public
mixed
OPSYS_OPENVMS
= 2
OPSYS_OS_2
public
mixed
OPSYS_OS_2
= 6
OPSYS_OS_400
public
mixed
OPSYS_OS_400
= 18
OPSYS_OS_X
public
mixed
OPSYS_OS_X
= 19
OPSYS_TANDEM
public
mixed
OPSYS_TANDEM
= 17
OPSYS_UNIX
public
mixed
OPSYS_UNIX
= 3
OPSYS_VFAT
public
mixed
OPSYS_VFAT
= 14
OPSYS_VM_CMS
public
mixed
OPSYS_VM_CMS
= 4
OPSYS_VSE
public
mixed
OPSYS_VSE
= 12
OPSYS_WINDOWS_NTFS
public
mixed
OPSYS_WINDOWS_NTFS
= 10
OPSYS_Z_CPM
public
mixed
OPSYS_Z_CPM
= 9
OPSYS_Z_SYSTEM
public
mixed
OPSYS_Z_SYSTEM
= 8
OVERWRITE
public
mixed
OVERWRITE
= 8
Properties
$filename
Archive filename (emulate ZipArchive::$filename)
public
string
$filename
$numFiles
Number of files (emulate ZipArchive::$numFiles)
public
int
$numFiles
= 0
$_oPclZip
protected
PclZip
$_oPclZip
$_tmpDir
protected
string
$_tmpDir
Methods
__call()
Catch function calls
public
__call(mixed $function, mixed $args) : mixed
Parameters
- $function : mixed
- $args : mixed
__construct()
public
__construct() : mixed
addEmptyDir()
Add Empty Dir
public
addEmptyDir(string $filename) : bool
Parameters
- $filename : string
Return values
booladdFile()
Add a new file to the zip archive
public
addFile(string $filename[, string $localname = NULL ]) : bool
Parameters
- $filename : string
-
Directory/Name of the file to add to the zip archive
- $localname : string = NULL
-
Directory/Name of the file added to the zip
Return values
booladdFromString()
Add a file to a ZIP archive using its contents
public
addFromString(string $localname, string $contents) : bool
Parameters
- $localname : string
-
The name of the entry to create.
- $contents : string
-
The contents to use to create the entry. It is used in a binary safe mode.
Return values
boolclose()
public
close() : mixed
deleteName()
Delete file from archive by given file name
public
deleteName(string $filename) : bool
Parameters
- $filename : string
-
Filename for the file in zip archive
Return values
boolgetFromName()
Extract file from archive by given file name
public
getFromName(string $filename) : string
Parameters
- $filename : string
-
Filename for the file in zip archive
Return values
string —$contents File string contents
open()
public
open(mixed $filename[, mixed $flags = NULL ]) : mixed
Parameters
- $filename : mixed
- $flags : mixed = NULL
pclzipLocateName()
Returns the index of the entry in the archive
public
pclzipLocateName(string $filename) : int
Parameters
- $filename : string
-
Filename for the file in zip archive