Documentation

Zip implements AdapterInterface

Interfaces, Classes and Traits

AdapterInterface

Table of Contents

compress()  : bool
Compress the file to an archive.
extract()  : bool
Open and extract the archive.

Methods

compress()

Compress the file to an archive.

public compress((string|array) $files[, (string) $destination = '' ][, (bool) $overwrite = false ]) : bool
Parameters
$files : (string|array)

The files that you want to compress.

$destination : (string) = ''

The file destination.

$overwrite : (bool) = false

True to delete the file; False to not delete it.

Tags
since
1.0.0
Return values
bool

True when succeeded; False when failed.

extract()

Open and extract the archive.

public extract([(string) $file = '' ][, (string) $target = '' ][, (bool) $delete = false ]) : bool
Parameters
$file : (string) = ''

The file that you want uncompress/open.

$target : (string) = ''

Where to extract the file.

$delete : (bool) = false

True to delete the file; False to not delete it.

Tags
since
1.0.0
Return values
bool

True when succeeded; False when failed.

Search results