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
$path
protected
string
$path
$type
protected
ArchiveEnum
$type
Methods
getExtension()
Get extension of the archive.
public
getExtension() : string
Return values
stringgetMimeType()
Get mime type of the archive.
public
static getMimeType(string $path) : string|null
Parameters
- $path : string
Return values
string|nullgetPath()
Get path to the archive.
public
getPath() : string
Return values
stringgetType()
Get type of the archive.
public
getType() : ArchiveEnum
Return values
ArchiveEnummake()
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
Return values
ArchiveZipCreateread()
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
BaseArchivereadFromString()
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