2017 © Pedro Peláez
 

library extractor

Extractor project for php

image

mmoreram/extractor

Extractor project for php

  • Wednesday, November 18, 2015
  • by mmoreram
  • Repository
  • 2 Watchers
  • 20 Stars
  • 74,254 Installations
  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 10 Versions
  • 4 % Grown

The README.md

Extractor library for php

This library extracts your files from compressed packages and returns a Symfony Finder instance, ready to be managed, (*1)

SensioLabsInsight License, (*2)

Installing/Configuring

Tags

  • Use last unstable version ( alias of dev-master ) to stay in last commit
  • Use last stable version tag to stay in a stable release.
  • Latest Unstable Version Latest Stable Version

Installing Extractor

You have to add require line into you composer.json file, (*3)

``` yml "require": { "php": ">=5.3.3", ..., (*4)

"mmoreram/extractor": "dev-master",

}, (*5)


Then you have to use composer to update your project dependencies ``` bash $ curl -sS https://getcomposer.org/installer | php $ php composer.phar update

Usage

Get a finder instance given a compressed file, (*6)

``` php <?php, (*7)

use Symfony\Component\Finder\Finder; use Mmoreram\Extractor\Filesystem\TemporaryDirectory; use Mmoreram\Extractor\Resolver\ExtensionResolver; use Mmoreram\Extractor\Extractor;, (*8)

$temporaryDirectory = new TemporaryDirectory(); $extensionResolver = new ExtensionResolver; $extractor = new Extractor( $temporaryDirectory, $extensionResolver );, (*9)

/** * @var Finder $files */ $files = $extractor->extractFromFile('/tmp/myfile.rar'); foreach ($files as $file) {, (*10)

echo $file->getRealpath() . PHP_EOL;

}, (*11)


## Adapters This library currently manages these extensions. All of these adapters only works if the php extension is installed. * Zip - http://php.net/manual/en/book.zip.php * Rar - http://php.net/manual/en/book.rar.php * Phar - http://php.net/manual/en/book.phar.php * Tar * GZ * BZ2 ## Directories This library provide the way of working with temporary and specific directories. ### Temporary directory ``` php use Mmoreram\Extractor\Filesystem\TemporaryDirectory; use Mmoreram\Extractor\Resolver\ExtensionResolver; use Mmoreram\Extractor\Extractor; $temporaryDirectory = new TemporaryDirectory(); $extensionResolver = new ExtensionResolver; $extractor = new Extractor( $temporaryDirectory, $extensionResolver );

Specific directory

``` php use Mmoreram\Extractor\Filesystem\SpecificDirectory; use Mmoreram\Extractor\Resolver\ExtensionResolver; use Mmoreram\Extractor\Extractor;, (*12)

$specificDirectory = new SpecificDirectory('/my/specific/path'); $extensionResolver = new ExtensionResolver; $extractor = new Extractor( $specificDirectory, $extensionResolver ); ```, (*13)

The Versions

18/11 2015

dev-master

9999999-dev

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

18/11 2015

v1.2.0

1.2.0.0

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

18/11 2015

dev-mmoreram-patch-1

dev-mmoreram-patch-1

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

29/10 2014

v1.1.1

1.1.1.0

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

18/10 2014

dev-fix/some-minor-changes

dev-fix/some-minor-changes

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

26/09 2014

dev-test-1

dev-test-1

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

26/09 2014

dev-test-3

dev-test-3

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

26/09 2014

dev-test-2

dev-test-2

Extractor project for php

  Sources   Download

MIT

The Requires

 

php phar extractor zip rar

05/09 2014

v1.1

1.1.0.0

Extractor project for php

  Sources   Download

MIT

The Requires

 

The Development Requires

php phar extractor zip rar

31/08 2014

v1.0

1.0.0.0

Extractor project for php

  Sources   Download

MIT

The Requires

 

The Development Requires

php phar extractor zip rar