Пример #1
0
 /**
  * Method to instantiate an archive adapter object
  *
  * @param  \Pop\Archive\Archive $archive
  * @return \Pop\Archive\Adapter\Tar
  */
 public function __construct(\Pop\Archive\Archive $archive)
 {
     if (stripos($archive->getExt(), 'bz') !== false) {
         $this->compression = 'bz';
     } else {
         if (stripos($archive->getExt(), 'gz') !== false) {
             $this->compression = 'gz';
         }
     }
     $this->path = $archive->getFullpath();
     $this->archive = new \Archive_Tar($this->path);
 }