Archive
An Archive handling class
since |
1.0 |
---|
Methods
__construct
Create a new Archive object.
__construct(array|\ArrayAccess $options = array())
since |
1.0 |
---|---|
throws |
|
Arguments
- $options
array|\ArrayAccess
An array of options
extract
Extract an archive file to a directory.
extract(string $archivename, string $extractdir) : boolean
since |
1.0 |
---|---|
throws |
|
Arguments
- $archivename
string
The name of the archive file- $extractdir
string
Directory to unpack into
Response
boolean
True for success
getAdapter
Get a file compression adapter.
getAdapter(string $type) : \Joomla\Archive\ExtractableInterface
since |
1.0 |
---|---|
throws |
|
Arguments
- $type
string
The type of adapter (bzip2|gzip|tar|zip).
Response
\Joomla\Archive\ExtractableInterface
Adapter for the requested type
setAdapter
Method to override the provided adapter with your own implementation.
setAdapter(string $type, string $class, boolean $override = true) : \Joomla\Archive\Archive
since |
1.0 |
---|---|
throws |
|
Arguments
- $type
string
Name of the adapter to set.- $class
string
FQCN of your class which implements ExtractableInterface.- $override
boolean
True to force override the adapter type.
Response
\Joomla\Archive\Archive
This object for chaining.
Properties
adapters
The array of instantiated archive adapters.
options
Holds the options array.
since |
1.0 |
---|
Type(s)
array|\ArrayAccess