interface AdapterInterface
Methods
ArchiveInterface |
open(String $path)
Opens an archive |
|
ArchiveInterface |
create(String $path, String|Array|Traversable|null $files = null, Boolean $recursive = true)
Creates a new archive |
|
Boolean |
isSupported()
Tests if the adapter is supported by the current environment |
|
Array |
listMembers(ResourceInterface $resource)
Returns the list of all archive members |
|
Array |
add(ResourceInterface $resource, String|Array|Traversable $files, Boolean $recursive = true)
Adds a file to the archive |
|
static String |
getName()
Returns the adapter name |
|
Array |
remove(ResourceInterface $resource, String|Array|Traversable $files)
Removes a member of the archive |
|
SplFileInfo |
extract(ResourceInterface $resource, String|null $to = null)
Extracts an entire archive |
|
SplFileInfo |
extractMembers(ResourceInterface $resource, Array $members, String|null $to = null)
Extracts specific members of the archive |
Details
at line 31
public ArchiveInterface
open(String $path)
Opens an archive
at line 49
public ArchiveInterface
create(String $path, String|Array|Traversable|null $files = null, Boolean $recursive = true)
Creates a new archive
Please note some adapters can not create empty archives.
They would throw a `NotSupportedException` in case you ask to create an archive without files
at line 56
public Boolean
isSupported()
Tests if the adapter is supported by the current environment
at line 67
public Array
listMembers(ResourceInterface $resource)
Returns the list of all archive members
at line 81
public Array
add(ResourceInterface $resource, String|Array|Traversable $files, Boolean $recursive = true)
Adds a file to the archive
at line 88
static public String
getName()
Returns the adapter name
at line 101
public Array
remove(ResourceInterface $resource, String|Array|Traversable $files)
Removes a member of the archive
at line 116
public SplFileInfo
extract(ResourceInterface $resource, String|null $to = null)
Extracts an entire archive
Note that any existing files will be overwritten by the adapter
at line 130
public SplFileInfo
extractMembers(ResourceInterface $resource, Array $members, String|null $to = null)
Extracts specific members of the archive