Documentation

Archive
in package

Table of Contents

Properties

$extension  : string
$password  : string|null
$path  : string
$type  : ArchiveEnum

Methods

getExtension()  : string
Get extension of the archive.
getMimeType()  : string|null
Get mime type of the archive.
getPath()  : string
Get path to the archive.
getType()  : ArchiveEnum
Get type of the archive.
make()  : ArchiveZipCreate
Create an archive from path, allowing extensions are `zip`, `epub`, `cbz`.
read()  : BaseArchive
Read an archive from the path.
readFromString()  : BaseArchive
Create an archive from contents.
__construct()  : mixed

Properties

$extension

protected string $extension

$password

protected string|null $password = null

Methods

getExtension()

Get extension of the archive.

public getExtension() : string
Return values
string

getMimeType()

Get mime type of the archive.

public static getMimeType(string $path) : string|null
Parameters
$path : string
Return values
string|null

getPath()

Get path to the archive.

public getPath() : string
Return values
string

make()

Create an archive from path, allowing extensions are `zip`, `epub`, `cbz`.

public static make(string $path[, bool $skipAllowed = false ]) : ArchiveZipCreate
Parameters
$path : string

Path to the archive

$skipAllowed : bool = false

Skip allowed extensions check

Tags
throws
Exception
Return values
ArchiveZipCreate

read()

Read an archive from the path.

public static read(string $path[, string|null $password = null ]) : BaseArchive
Parameters
$path : string
$password : string|null = null
Return values
BaseArchive

readFromString()

Create an archive from contents.

public static readFromString(string $contents[, string|null $password = null ][, string|null $extension = null ]) : BaseArchive
Parameters
$contents : string

Contents of the archive.

$password : string|null = null

Password of the archive, can be null if no password.

$extension : string|null = null

Extension of the archive, can be null to detect automatically mimetype.

Return values
BaseArchive

__construct()

protected __construct(string $path, string $extension, ArchiveEnum $type[, string|null $password = null ]) : mixed
Parameters
$path : string
$extension : string
$type : ArchiveEnum
$password : string|null = null

        
On this page

Search results