<?php
namespace App\Archive\Uncompress; class Zip7 extends UncompressAbstractClass { public function extractTo($pathDestination) { $command = sprintf("7ze e %s -o %s", escapeshellarg($this->location), escapeshellarg($pathDestination)); $processObject = new \Engine\Os\Command\Process($command); $processObject->runAndCaptureErrors(); $outputObject = $processObject->getCommandOutputObj(); if ($outputObject->hasError()) { throw new \RuntimeException(sprintf("Uncompress failed. `%s` returned [%s]%s.", $command, $outputObject->getErrorNumber(), $outputObject->getOutput())); } return parent::extractTo($pathDestination); } }