Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Archive

Fonctions membres publiques

 __construct ($options=[])
 
 extract ($archivename, $extractdir)
 
 setAdapter ($type, $class, $override=true)
 
 getAdapter ($type)
 

Champs de données

 $options = []
 

Attributs protégés

 $adapters = []
 

Description détaillée

An Archive handling class

Depuis
1.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options = [])

Create a new Archive object.

Paramètres
array | \ArrayAccess$optionsAn array of options
Depuis
1.0
Exceptions

Références Archive\$options.

Documentation des fonctions membres

◆ extract()

extract (   $archivename,
  $extractdir 
)

Extract an archive file to a directory.

Paramètres
string$archivenameThe name of the archive file
string$extractdirDirectory to unpack into
Renvoie
boolean True for success
Depuis
1.0
Exceptions
UnknownArchiveExceptionif the archive type is not supported

Références $path, $result, File\copy(), Folder\create(), Archive\getAdapter(), et null.

◆ getAdapter()

getAdapter (   $type)

Get a file compression adapter.

Paramètres
string$typeThe type of adapter (bzip2|gzip|tar|zip).
Renvoie
ExtractableInterface Adapter for the requested type
Depuis
1.0

Références $type, et Archive\setAdapter().

Référencé par Archive\extract().

◆ setAdapter()

setAdapter (   $type,
  $class,
  $override = true 
)

Method to override the provided adapter with your own implementation.

Paramètres
string$typeName of the adapter to set.
string$classFQCN of your class which implements ExtractableInterface.
boolean$overrideTrue to force override the adapter type.
Renvoie
$this
Depuis
1.0
Exceptions
UnsupportedArchiveExceptionif the adapter type is not supported

Références $class, $this, $type, et class.

Référencé par Archive\getAdapter().

Documentation des champs

◆ $adapters

$adapters = []
protected

◆ $options

$options = []

Référencé par Archive\__construct().


La documentation de cette classe a été générée à partir du fichier suivant :