Доработка реестра
This commit is contained in:
parent
517dc477ed
commit
fa4adbb75f
3 changed files with 28 additions and 12 deletions
|
|
@ -14,11 +14,27 @@ class Registry extends Settings
|
|||
|
||||
/**
|
||||
*/
|
||||
static public function getInstance ()
|
||||
static public function getInstance()
|
||||
{
|
||||
if (self::$instance == null) {
|
||||
self::$instance = new Registry();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Список модулей
|
||||
*/
|
||||
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