class Archive (View source)

Archive class.

Properties

string $command Archive command.
boolean $strict Strict error checking.

Methods

void
__construct(string $archive)

Constructor.

string
__toString()

Convert object of class to string.

object
add_files(mixed $files)

Add files to archive file.

mixed
get_files()

Returns files to be added to archive file.

string
zipinfo(array $options = [])

Returns archive file info (zip).

object
zip(array $options = [], bool $strict = false)

Create archive file (zip).

object
unzip(array $options = [], array $arguments = [], bool $strict = true)

Extract archive file (zip).

object
tar(array $options = [], array $arguments = [], bool $strict = true)

Create archive file (tar).

object
xz(array $options = [], bool $strict = true)

Compresses archive file (xz).

mixed
run()

Executes archive command.

Details

void __construct(string $archive)

Constructor.

Parameters

string $archive archive filename

Return Value

void

string __toString()

Convert object of class to string.

Return Value

string

final object add_files(mixed $files)

Add files to archive file.

Parameters

mixed $files files to archive

Return Value

object

final mixed get_files()

Returns files to be added to archive file.

Return Value

mixed

final string zipinfo(array $options = [])

Returns archive file info (zip).

Parameters

array $options supported zip command options.

Return Value

string

final object zip(array $options = [], bool $strict = false)

Create archive file (zip).

Parameters

array $options supported zip command options
bool $strict strict error checking

Return Value

object

final object unzip(array $options = [], array $arguments = [], bool $strict = true)

Extract archive file (zip).

Parameters

array $options supported zip command options
array $arguments supported zip command arguments
bool $strict strict error checking

Return Value

object

final object tar(array $options = [], array $arguments = [], bool $strict = true)

Create archive file (tar).

Parameters

array $options supported tar command options
array $arguments supported tar command arguments
bool $strict strict error checking

Return Value

object

final object xz(array $options = [], bool $strict = true)

Compresses archive file (xz).

Parameters

array $options supported tar command options.
bool $strict strict error checking

Return Value

object

final mixed run()

Executes archive command.

.

Return Value

mixed exit status code or false (no files)