Exemple #1
0
 /**
  * Destructor
  */
 public function __destruct()
 {
     if ($this->_archive !== null) {
         $this->_archive->close();
     }
 }
Exemple #2
0
 private function Unrar($filepath, $location)
 {
     $rar = new RarArchive();
     $res = $rar->open($filepath);
     if ($res === TRUE) {
         $entries = $rar->getEntries();
         foreach ($entries as $entry) {
             $entry->extract($location);
         }
         $rar->close();
         return true;
     }
     throw new Exception('rarfailed');
 }