function isAuthorized() { if (Reg::isRegistered(ConfigManager::getConfig("Users", "Users")->ObjectsIgnored->User)) { return true; } return false; }
/** * Load plugin objects * * @param boolean $overrideObjects * @throws RuntimeException */ private function loadObjects($overrideObjects = false) { if (isset($this->config->Objects)) { foreach (array_keys(get_object_vars($this->config->Objects)) as $objectName) { if ($this->packageManager->isObjectInitIsAllowed($this->config->Objects->{$objectName}, $this->packageName, $this->pluginName)) { if ($overrideObjects === false and Reg::isRegistered($this->config->Objects->{$objectName})) { throw new RuntimeException("Object {$this->config->Objects->{$objectName}} is already defined. If you want to redefine it anyway pass true as 3rd argument to usePlugin function of PackageManager."); } $loadFuncName = "load{$objectName}"; if (method_exists($this, $loadFuncName)) { $this->{$loadFuncName}(); if (!Reg::isRegistered($this->config->Objects->{$objectName})) { throw new RuntimeException("Loader function for object {$objectName} in plugin {$this->pluginName} of package {$this->packageName} didn't registered it's object in registry!"); } } else { throw new RuntimeException("Object loader of plugin {$this->pluginName} in package {$this->packageName} for object {$objectName} doesn't exists!"); } } } } }