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

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> * </code>
*/ */
namespace ctiso; namespace ctiso;
use ZipArchive, use ctiso\Tools\SQLStatementExtractor;
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 class Setup
{ {
@ -32,8 +43,8 @@ class Setup
$this->target = ''; $this->target = '';
$this->source = ''; $this->source = '';
$this->zip = new ZipArchive(); $this->zip = new FakeZipArchive();
$this->zip->open(strtr($file, array('.xml' => '.zip'))); $this->zip->open(strtr($file, array('.xml' => '')));
array_push($this->stack, $this->node); array_push($this->stack, $this->node);