Loads a config file.

@param string $namespace
@throws ConfigException
184008
public function load($namespace)
    {
        if ($path = $this->cache->isCached($namespace)) {
            if (filectime($this->configPath.$namespace.self::CONFIG_EXT) <= filectime($path)) {
                $this->data[$namespace] = include $path;

                return;
            }
        }
        if (file_exists($this->configPath.$namespace.self::CONFIG_EXT)) {
            $data = Yaml::parse(file_get_contents($this->configPath.$namespace.self::CONFIG_EXT));
            $this->data[$namespace] = $data;
            $this->cache->setString($namespace, '<?php return '.var_export($data, true).'; ?>');

            return;
        }
        throw new ConfigException("Could not load Configuration '".$namespace."'");
    }
133677
public function loadConfig($name)
    {
        // only if config not yet exists
        if (!$this->configExists($name))
            $this->config[$name] = $this->getConfigObjectFromDatabase($name);
    }
371093
protected function update($namespace, $config) {
		foreach ($config as $k => $v) {
			if (strpos($k, '.') === false) {
				$this->cache[$namespace][$k] = $v;
				continue;
			}
			$keys = explode('.', $k);
			$total = count($keys) - 1;
			$parent = &$this->cache[$namespace];
			foreach ($keys as $kk => $vv) {
				if ($total === $kk) {
					$parent[$vv] = $v;
				} else {
					if (!isset($parent[$vv])) {
						$parent[$vv] = [];
					}
					$parent = &$parent[$vv];
				}
			}
		}
	}
495460
public function changeNamespace(string $namespace): void
	{
		$this->setNamespace($namespace);
		$result = $this->getStorage()->fetchAll();
		foreach ($result as $row) {
			$resource = $this->imageStorage->getResource($row->name);
			$resource->setNamespace($this->namespace);
			$this->imageStorage->save($resource);

			$this->getStorage()->update($row->key, $resource->getIdentifier());
		}
	}
1099012
static function deleteConfigByName($namespace, $name) 
    {
        $result = CommonConfigModel::where('namespace', $namespace)
                                    ->where('name', $name)
                                    ->delete();
        self::setCache($namespace);
        return $result;
    }
370604
public function setConfig($config) {
		$this->config = $config;
		
		if (in_array($this->config['namespace'], $this->config['modules']))
		    $this->dataNamespace = $this->config['namespace'];
		    
	    if ($this->config['entitysingular'])
	        $this->entitysingular = $this->config['entitysingular'];
	        
        if ($this->entitysingular)
            if ($this->config['singularignore'])
                $this->singularignore = $this->config['singularignore'];
	}
894381
public function loadPlugin($namespace, $path)
    {
        $className = $namespace.'\Plugin';
        $classPath = $path.'/Plugin.php';

        try {
            // Autoloader failed?
            if (!class_exists($className)) {
                include_once $classPath;
            }

            // Not a valid plugin!
            if (!class_exists($className)) {
                return;
            }

            $classObj = new $className($this->app);
        } catch (\Throwable $e) {
            Log::error('Plugin ' . $className . ' could not be instantiated.', [
                'message' => $e->getMessage(),
                'file' => $e->getFile(),
                'line' => $e->getLine(),
                'trace' => $e->getTraceAsString()
            ]);
            return;
        }

        $classId = $this->getIdentifier($classObj);

        /*
         * Check for disabled plugins
         */
        if ($this->isDisabled($classId)) {
            $classObj->disabled = true;
        }

        $this->plugins[$classId] = $classObj;
        $this->pathMap[$classId] = $path;

        return $classObj;
    }
1006335
final public function load($namespace, $resource)
    {
        $allowParent = !$this->defaults->getChanges() && empty($this->instanceof);

        return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, $allowParent);
    }
751761
public function addPath(string $path, string $namespace = null) : void
    {
        if (! $namespace) {
            $this->template->addLocation($path);
            return;
        }

        $this->template->addNamespace($namespace, $path);
    }
932804
protected function writeRulesFile($namespace)
    {
        $stub = file_get_contents(
            __DIR__.'/../Stubs/Rules.php'
        );

        $stub = $this->replace('{{Namespace}}', $namespace, $stub);

        file_put_contents(
            base_path('app/Settings/Resources/Rules.php'),
            $stub
        );
    }
857157
protected function loadConstantsFrom($path, $namespace = null)
    {
        $constants = require $path;
        $prefix = $namespace ? "$namespace" : '';

        foreach ($constants as $constant => $value) {
            define(strtoupper("{$prefix}{$constant}"), $value);
        }
    }
680670
public function setNamespace($name)
	{
		$this->config['namespace'] = is_bool($name) ? $name : (string) $name;

		if ($this->config['namespace'] === true)
		{
			$this->config['namespace'] = $this->app ? $app->getName() : false;
		}

		$this->data->setNamespace($this->config['namespace']);
	}
849047
protected function loadConfig()
    {
        $this->namespace = config('repository.generate.namespace', $this->namespace);
        $this->base      = config('repository.generate.base', $this->base);
        $this->suffix    = config('repository.generate.suffix', $this->suffix);
        $this->models    = config('repository.generate.models', $this->models);
    }
556176
protected function loadViewsFrom($path, $namespace)
    {
        if (is_dir($appPath = resource_path('views/vendor/' . $namespace))) {
            $this->container['view']->addNamespace($namespace, $appPath);
        }

        $this->container['view']->addNamespace($namespace, $path);
    }
943732
private function loadComponent($namespace, $component)
    {
        $fullyQualifiedCloudControlComponent = '\\CloudControl\\Cms\\components\\' . $component;
        $fullyQualifiedComponent = '\\components\\' . $component;
        if (class_exists($fullyQualifiedCloudControlComponent, true)) {
            $this->runComponent($namespace, $fullyQualifiedCloudControlComponent);
        } elseif (class_exists($fullyQualifiedComponent, true)) {
            $this->runComponent($namespace, $fullyQualifiedComponent);
        }
    }
116876
public function setNamespace(string $namespace): void
	{
		$storage = $this->getStorage();
		if ($storage instanceof UserStorage) {
			$storage->setNamespace($namespace);
		}
		$this->initIdentity();
	}
804526
static function load($namespace,$folder = ''){
	
		if(!isset(self::$files[$namespace])){
			$ns = self::getName($namespace,$folder);
			
			if(!file_exists($ns->path)){
				Exceptions::showError('Server Error','Missing File '.$ns->path.' Not Found');
				exit;
			}
			
			require_once $ns->path;
			self::$files[$namespace] = $ns;
		}
	}