Merge branch 'master' into noglob

This commit is contained in:
origami11@yandex.ru 2022-11-18 16:07:32 +03:00
commit 7d35a8f3f0
27 changed files with 430 additions and 288 deletions

View file

@ -6,6 +6,7 @@ use ctiso\File,
class Registry {
public $namespace = [];
public $data;
function importFile($namespace, $filePath = null) {
$data = json_decode(File::getContents($filePath), true);
@ -40,4 +41,20 @@ class Registry {
function set($ns, $key, $value) {
$this->namespace[$ns]['data'][$key] = $value;
}
/**
* Список модулей
*/
public function getModules()
{
return array_keys($this->data);
}
/**
* Проверка наличия модуля
*/
public function hasModule($name)
{
return isset($this->data[$name]);
}
}