<?php
namespace SHServ\Middleware;
/**
* Реестр runtime-скриптов автоматизации.
* Заменяет static-хранилища в ControlScripts, позволяя сбрасывать
* состояние в рамках одного lifecycle приложения (request / test).
*/
class ScriptsRegistry {
public array $actions = [];
public array $regular = [];
public array $syncMap = ["connections" => []];
public function flush(): void {
$this->actions = [];
$this->regular = [];
$this->syncMap = ["connections" => []];
}
public function getRegularScripts(): array {
return $this->regular;
}
public function getActionsScripts(): array {
return $this->actions;
}
public function getSyncMap(): array {
return $this->syncMap;
}
}