Archive
An Archive handling class
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
Create a new Archive object.
__construct(array|\ArrayAccess options = []) :
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- options
array<string|int, mixed>|ArrayAccessAn array of options
Response
mixed
extract
Extract an archive file to a directory.
extract( archivename, extractdir) :
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- archivename
stringThe name of the archive file- extractdir
stringDirectory to unpack into
Response
boolTrue for success
getAdapter
Get a file compression adapter.
getAdapter( type) : \Joomla\Archive\ExtractableInterface
| since |
1.0 |
|---|
Arguments
- type
stringThe type of adapter (bzip2|gzip|tar|zip).
Response
ExtractableInterfaceAdapter for the requested type
setAdapter
Method to override the provided adapter with your own implementation.
setAdapter( type, class, override = true) :
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- type
stringName of the adapter to set.- class
stringFQCN of your class which implements ExtractableInterface.- override
boolTrue to force override the adapter type.
Response
$this
Properties
adapters
The array of instantiated archive adapters.
options
Holds the options array.
| since |
1.0 |
|---|
Type(s)
array<string|int, mixed>|ArrayAccess