\PhpZip\Model\Extra\FieldsAbstractUnicodeExtraField

A common base class for Unicode extra information extra fields.

Summary

Methods
Properties
Constants
__construct()
getCrc32()
setCrc32()
getUnicodeValue()
setUnicodeValue()
unpackLocalFileData()
unpackCentralDirData()
packLocalFileData()
packCentralDirData()
No public properties found
DEFAULT_VERSION
No protected methods found
No protected properties found
N/A
No private methods found
$crc32
$unicodeValue
N/A

Constants

DEFAULT_VERSION

DEFAULT_VERSION = 0x1

Properties

$crc32

$crc32 : int

Type

int

$unicodeValue

$unicodeValue : string

Type

string

Methods

__construct()

__construct(int  $crc32, string  $unicodeValue) : mixed

Parameters

int $crc32
string $unicodeValue

Returns

mixed —

getCrc32()

getCrc32() : int

Returns

int —

the CRC32 checksum of the filename or comment as encoded in the central directory of the zip file

setCrc32()

setCrc32(int  $crc32) : mixed

Parameters

int $crc32

Returns

mixed —

getUnicodeValue()

getUnicodeValue() : string

Returns

string —

setUnicodeValue()

setUnicodeValue(string  $unicodeValue) : mixed

Parameters

string $unicodeValue

the UTF-8 encoded name to set

Returns

mixed —

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

Throws

\PhpZip\Exception\ZipException

on error

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

Throws

\PhpZip\Exception\ZipException

on error

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