예제 #1
0
 public function __construct($cmdBinPath = '/bin/tar')
 {
     if ($cmdBinPath === null) {
         throw new UnimplementedFeatureException('no built-in support for GNU Tar');
     }
     parent::__construct($cmdBinPath);
 }
예제 #2
0
 public function open($sourceFile)
 {
     parent::open($sourceFile);
     if ($this->zipArchive) {
         $resultCode = $this->zipArchive->open($sourceFile);
         if ($resultCode !== true) {
             throw new ArchiverException('ZipArchive::open() returns error code == ' . $resultCode);
         }
     }
     return $this;
 }