/** * Instantiate an archive adapter object * * @param \Pop\Archive\Archive $archive * @return Tar */ public function __construct(\Pop\Archive\Archive $archive) { if (stripos($archive->getExtension(), 'bz') !== false) { $this->compression = 'bz'; } else { if (stripos($archive->getExtension(), 'gz') !== false) { $this->compression = 'gz'; } } $this->path = $archive->getFullpath(); $this->archive = new \Archive_Tar($this->path); }