Julio Montoya 321ce65f18 Updating vendors | 11 anos atrás | |
---|---|---|
.. | ||
docs | 11 anos atrás | |
src | 11 anos atrás | |
tests | 11 anos atrás | |
.travis.yml | 11 anos atrás | |
CHANGELOG.md | 11 anos atrás | |
LICENSE | 11 anos atrás | |
README.md | 11 anos atrás | |
composer.json | 11 anos atrás | |
composer.lock | 11 anos atrás | |
phpunit-functional.xml.dist | 11 anos atrás | |
phpunit.xml.dist | 11 anos atrás |
A Object-Oriented PHP library to manipulate any archive format (de)compression through commandline utilities or PHP extension.
Zippy currently support
Which bring support to file types
use Alchemy\Zippy\Zippy;
$zippy = Zippy::load();
$zippy->create('archive.zip');
$archive = $zippy->open('build.tar');
// extract content to `/tmp`
$archive->extract('/tmp');
// iterates through members
foreach ($archive as $member) {
echo "archive contains $member \n";
}
use Alchemy\Zippy\Zippy;
$zippy = Zippy::load();
// creates an archive.zip that contains a directory "folder" that contains
// files contained in "/path/to/directory" recursively
$archive = $zippy->create('archive.zip', array(
'folder' => '/path/to/directory'
), recursive = true);
use Alchemy\Zippy\Zippy;
$zippy = Zippy::load();
$archive = $zippy->create('archive.zip', array(
'folder' => '/path/to/directory', // will create a folder at root
'http://www.google.com/logo.jpg', // will create a logo.jpg file at root
fopen('https://www.facebook.com/index.php'), // will create an index.php at root
'directory/image.jpg' => 'image.jpg', // will create a image.jpg in 'directory' folder
));
##API Browser
Documentation hosted at read the docs !
##License
This project is licensed under the MIT license.