Установка из папки вместо архива

This commit is contained in:
origami11@yandex.ru 2024-04-17 20:37:27 +03:00
parent 431c68bb0e
commit 85b957c8af

View file

@ -8,8 +8,19 @@
* </code>
*/
namespace ctiso;
use ZipArchive,
ctiso\Tools\SQLStatementExtractor;
use ctiso\Tools\SQLStatementExtractor;
use ctiso\Path;
class FakeZipArchive {
public $base;
function open($path) {
$this->base = $path;
}
function getFromName($file) {
return file_get_contents(Path::join($this->base, $file));
}
}
class Setup
{
@ -32,8 +43,8 @@ class Setup
$this->target = '';
$this->source = '';
$this->zip = new ZipArchive();
$this->zip->open(strtr($file, array('.xml' => '.zip')));
$this->zip = new FakeZipArchive();
$this->zip->open(strtr($file, array('.xml' => '')));
array_push($this->stack, $this->node);