PHP Класс Pop\Archive\Archive

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$adapter mixed Archive adapter
$allowed array Array of allowed file types.

Открытые методы

Метод Описание
__construct ( string $archive, string $password = null, string $prefix = 'Pop\Archive\Adapter\' ) : Archive Constructor
adapter ( ) : mixed Method to return the adapter object
addFiles ( string | array $files ) : Archive Method to create an archive file
archive ( ) : mixed Method to return the archive object within the adapter object
compress ( string $ext = 'gz' ) : Archive Method to compress an archive file with Gzip or Bzip2
extract ( string $to = null ) : Archive Method to extract an archived and/or compressed file
factory ( string $archive, string $password = null ) : Archive Static method to instantiate the archive object and return itself to facilitate chaining methods together.
formats ( ) : array Get formats
listFiles ( boolean $full = false ) : array Method to return a listing of the contents of an archived file

Защищенные методы

Метод Описание
setAdapter ( string $password = null, string $prefix ) : void Method to set the adapter based on the file name

Описание методов

__construct() публичный Метод

Instantiate the archive object
public __construct ( string $archive, string $password = null, string $prefix = 'Pop\Archive\Adapter\' ) : Archive
$archive string
$password string
$prefix string
Результат Archive

adapter() публичный Метод

Method to return the adapter object
public adapter ( ) : mixed
Результат mixed

addFiles() публичный Метод

Method to create an archive file
public addFiles ( string | array $files ) : Archive
$files string | array
Результат Archive

archive() публичный Метод

Method to return the archive object within the adapter object
public archive ( ) : mixed
Результат mixed

compress() публичный Метод

Method to compress an archive file with Gzip or Bzip2
public compress ( string $ext = 'gz' ) : Archive
$ext string
Результат Archive

extract() публичный Метод

Method to extract an archived and/or compressed file
public extract ( string $to = null ) : Archive
$to string
Результат Archive

factory() публичный статический Метод

Static method to instantiate the archive object and return itself to facilitate chaining methods together.
public static factory ( string $archive, string $password = null ) : Archive
$archive string
$password string
Результат Archive

formats() публичный статический Метод

Get formats
public static formats ( ) : array
Результат array

listFiles() публичный Метод

Method to return a listing of the contents of an archived file
public listFiles ( boolean $full = false ) : array
$full boolean
Результат array

setAdapter() защищенный Метод

Method to set the adapter based on the file name
protected setAdapter ( string $password = null, string $prefix ) : void
$password string
$prefix string
Результат void

Описание свойств

$adapter защищенное свойство

Archive adapter
protected mixed $adapter
Результат mixed

$allowed защищенное свойство

Array of allowed file types.
protected array $allowed
Результат array