Merge branch 'master' into noglob
This commit is contained in:
commit
7d35a8f3f0
27 changed files with 430 additions and 288 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue