Archive
An Archive handling class
since |
1.0 |
---|---|
package |
Joomla Framework |
Methods
__construct
Create a new Archive object.
__construct(array|\ArrayAccess options = []) : mixed
since |
1.0 |
---|---|
throws |
|
Arguments
- options
array|\ArrayAccess
An array of options
Response
mixed
extract
Extract an archive file to a directory.
extract(string archivename, string extractdir) : bool
since |
1.0 |
---|---|
throws |
|
Arguments
- archivename
string
The name of the archive file- extractdir
string
Directory to unpack into
Response
bool
True for success
getAdapter
Get a file compression adapter.
getAdapter(string type) : \Joomla\Archive\ExtractableInterface
since |
1.0 |
---|
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, bool override = true) : $this
since |
1.0 |
---|---|
throws |
|
Arguments
- type
string
Name of the adapter to set.- class
string
FQCN of your class which implements ExtractableInterface.- override
bool
True to force override the adapter type.
Response
$this
Properties
adapters
The array of instantiated archive adapters.
since |
1.0 |
---|
Type(s)
\Joomla\Archive\ExtractableInterface[]
options
Holds the options array.
since |
1.0 |
---|
Type(s)
array|\ArrayAccess