2017 © Pedro Peláez
 

joomla-package archive

Joomla Archive Package

image

joomla/archive

Joomla Archive Package

  • Saturday, July 14, 2018
  • by mbabker
  • Repository
  • 8 Watchers
  • 2 Stars
  • 10,890 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 13 Versions
  • 10 % Grown

The README.md

The Archive Package Build Status

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

The archive package will intelligently load the correct adapter for the specified archive type. It knows how to properly handle the following archive types:, (*2)

  • zip
  • tar | tgz | tbz2
  • gz | gzip
  • bz2 | bzip2

Loading files of the t* archive type will uncompress the archive using the appropriate adapter, and then extract via tar., (*3)

Requirements

  • PHP 5.3+
  • zlib extension for GZip support
  • bz2 extension for BZip2 support

Usage

$options = array('tmp_path' => '/tmp');

$archive = new Joomla\Archive\Archive($options)

$archive->extract(__DIR__ . '/archive.zip', __DIR__ . '/destination');

Overriding Adapters

If you have a custom adapter you would like to use for extracting, this package allows you to override the defaults. Just implement ExtractableInterface when creating your adapter, and then use the setAdapter method to override., (*4)


class MyZipAdapter implements \Joomla\Archive\ExtractableInterface { public static function isSupported() { // Do you test return true; } public function extract($archive, $destination) { // Your code } } $archive = new Archive; // You need to pass the fully qualified class name. $archive->setAdapter('zip', '\\MyZipAdapter'); // This will use your $archive->extract('archive.zip', 'destination');

Installation via Composer

Add "joomla/archive": "~1.0" to the require block in your composer.json and then run composer install., (*5)

{
    "require": {
        "joomla/archive": "~1.0"
    }
}

Alternatively, you can simply run the following from the command line:, (*6)

composer require joomla/archive "~1.0"

If you want to include the test sources, use, (*7)

composer require --prefer-source joomla/archive "~1.0"

The Versions

14/07 2018

dev-2.0-dev

dev-2.0-dev https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

 

The Development Requires

framework archive joomla

30/06 2018

dev-master

9999999-dev https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

 

The Development Requires

framework archive joomla

12/06 2017

1.1.5

1.1.5.0 https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

framework archive joomla

10/12 2016

1.1.4

1.1.4.0 https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

framework archive joomla

23/08 2014

1.1.3

1.1.3.0 https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

framework archive joomla

09/02 2014

1.1.2

1.1.2.0 https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

09/02 2014

1.1.1

1.1.1.0 https://github.com/joomla-framework/archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

05/12 2013

1.1.0

1.1.0.0 https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

29/11 2013

1.0

1.0.0.0 https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

22/10 2013

1.0-beta3

1.0.0.0-beta3 https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

16/08 2013

1.0-beta2

1.0.0.0-beta2 https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

16/08 2013

1.0-beta

1.0.0.0-beta https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla

04/06 2013

1.0-alpha

1.0.0.0-alpha https://github.com/joomla/joomla-framework-archive

Joomla Archive Package

  Sources   Download

GPL-2.0+

The Requires

 

framework archive joomla