Documentation

Archive

Table of Contents

$adapter  : object
Store the adapter object.
__construct()  : mixed
The constructor.
compress()  : bool
Compress the file to an archive.
extract()  : bool
Open and extract the archive.
setAdapter()  : object
Set the adapter.

Properties

$adapter

Store the adapter object.

private object $adapter = null
Tags
since
1.0.0

Methods

__construct()

The constructor.

public __construct([mixed $adapter = null ]) : mixed
Parameters
$adapter : mixed = null
Tags
since
1.0.0
Return values
mixed

compress()

Compress the file to an archive.

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

The file(/s) that you want 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.

setAdapter()

Set the adapter.

public setAdapter((string) $adapter) : object
Parameters
$adapter : (string)
Tags
since
1.0.0
Return values
object

Search results