class ZipFile

Zip file helpers

Methods

static bool
extract(string $file, string $destination, array|string|int|null $files = null)

Extract zip arhive

static string|null
getItemPath(string $zipFile, int $index)

Get zip file item name

static bool
create(string $source, string $destination, array $skipDir = [])

Create zip arhive

static bool
isValid(string $file)

Check if zip arhive is valid

static string|null
getZipError(mixed $resource)

Get zip error

Details

at line 30
static bool extract(string $file, string $destination, array|string|int|null $files = null)

Extract zip arhive

Parameters

string $file
string $destination
array|string|int|null $files

Return Value

bool

at line 64
static string|null getItemPath(string $zipFile, int $index)

Get zip file item name

Parameters

string $zipFile
int $index

Return Value

string|null

at line 83
static bool create(string $source, string $destination, array $skipDir = [])

Create zip arhive

Parameters

string $source
string $destination
array $skipDir

Return Value

bool

at line 142
static bool isValid(string $file)

Check if zip arhive is valid

Parameters

string $file

Return Value

bool

at line 165
static string|null getZipError(mixed $resource)

Get zip error

Parameters

mixed $resource

Return Value

string|null