1 <?php
 2 /**
 3  * @package     Joomla.Platform
 4  * @subpackage  Archive
 5  *
 6  * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 7  * @license     GNU General Public License version 2 or later; see LICENSE
 8  */
 9 
10 defined('JPATH_PLATFORM') or die;
11 
12 /**
13  * Wrapper class for JArchive
14  *
15  * @package     Joomla.Platform
16  * @subpackage  Archive
17  * @since       3.4
18  */
19 class JArchiveWrapperArchive
20 {
21     /**
22      * Helper wrapper method for extract
23      *
24      * @param   string  $archivename  The name of the archive file
25      * @param   string  $extractdir   Directory to unpack into
26      *
27      * @return  boolean  True for success
28      *
29      * @see     JArchive::extract()
30      * @since   3.4
31      * @throws InvalidArgumentException
32      */
33     public function extract($archivename, $extractdir)
34     {
35         return JArchive::extract($archivename, $extractdir);
36     }
37 
38     /**
39      * Helper wrapper method for getAdapter
40      *
41      * @param   string  $type  The type of adapter (bzip2|gzip|tar|zip).
42      *
43      * @return  JArchiveExtractable  Adapter for the requested type
44      *
45      * @see     JUserHelper::getAdapter()
46      * @since   3.4
47      */
48     public function getAdapter($type)
49     {
50         return JArchive::getAdapter($type);
51     }
52 }
53