PHP Class Pop\Archive\Archive

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$adapter mixed Archive adapter
$allowed array Array of allowed file types.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
setAdapter ( string $password = null, string $prefix ) : void Method to set the adapter based on the file name

Method Details

__construct() public méthode

Instantiate the archive object
public __construct ( string $archive, string $password = null, string $prefix = 'Pop\Archive\Adapter\' ) : Archive
$archive string
$password string
$prefix string
Résultat Archive

adapter() public méthode

Method to return the adapter object
public adapter ( ) : mixed
Résultat mixed

addFiles() public méthode

Method to create an archive file
public addFiles ( string | array $files ) : Archive
$files string | array
Résultat Archive

archive() public méthode

Method to return the archive object within the adapter object
public archive ( ) : mixed
Résultat mixed

compress() public méthode

Method to compress an archive file with Gzip or Bzip2
public compress ( string $ext = 'gz' ) : Archive
$ext string
Résultat Archive

extract() public méthode

Method to extract an archived and/or compressed file
public extract ( string $to = null ) : Archive
$to string
Résultat Archive

factory() public static méthode

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
Résultat Archive

formats() public static méthode

Get formats
public static formats ( ) : array
Résultat array

listFiles() public méthode

Method to return a listing of the contents of an archived file
public listFiles ( boolean $full = false ) : array
$full boolean
Résultat array

setAdapter() protected méthode

Method to set the adapter based on the file name
protected setAdapter ( string $password = null, string $prefix ) : void
$password string
$prefix string
Résultat void

Property Details

$adapter protected_oe property

Archive adapter
protected mixed $adapter
Résultat mixed

$allowed protected_oe property

Array of allowed file types.
protected array $allowed
Résultat array