Пример #1
0
 public function __construct(\Path $path)
 {
     $this->archive = \RarArchive::open($path->getPathName());
     if (!$this->archive) {
         throw new Exception('Failed to open archive');
     }
 }
Пример #2
0
 public function __construct(\Path $path)
 {
     $this->archive = new \ZipArchive();
     $result = $this->archive->open($path->getPathName());
     if (!$result) {
         throw new Exception('Failed to open archive');
     }
 }