\PhpZip\Model\ExtraZipExtraField

Extra Field in a Local or Central Header of a ZIP archive.

It defines the common properties of all Extra Fields and how to serialize/unserialize them to/from byte arrays.

Summary

Methods
Constants
getHeaderId()
unpackLocalFileData()
unpackCentralDirData()
packLocalFileData()
packCentralDirData()
__toString()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getHeaderId()

getHeaderId() : int

Returns the Header ID (type) of this Extra Field.

The Header ID is an unsigned short integer (two bytes) which must be constant during the life cycle of this object.

Returns

int —

unpackLocalFileData()

unpackLocalFileData(string  $buffer, \PhpZip\Model\ZipEntry|null  $entry = null) : static

Populate data from this array as if it was in local file data.

Parameters

string $buffer

the buffer to read data from

\PhpZip\Model\ZipEntry|null $entry

Returns

static —

unpackCentralDirData()

unpackCentralDirData(string  $buffer, \PhpZip\Model\ZipEntry|null  $entry = null) : static

Populate data from this array as if it was in central directory data.

Parameters

string $buffer

the buffer to read data from

\PhpZip\Model\ZipEntry|null $entry

Returns

static —

packLocalFileData()

packLocalFileData() : string

The actual data to put into local file data - without Header-ID or length specifier.

Returns

string —

the data

packCentralDirData()

packCentralDirData() : string

The actual data to put into central directory - without Header-ID or length specifier.

Returns

string —

the data

__toString()

__toString() : string

Returns

string —