Loads a configuration.

@param string $configurationNamespace Configuration namespace
@param string $configurationKey       Configuration key

@return ConfigurationInterface|null Object saved
547746
private function loadConfiguration(
        $configurationNamespace,
        $configurationKey
    ) {
        $configurationEntity = $this
            ->configurationRepository
            ->find([
                'namespace' => $configurationNamespace,
                'key' => $configurationKey,
            ]);

        return $configurationEntity;
    }
608705
def get_namespace(name):
    
    if name not in configuration_namespaces:
        configuration_namespaces[name] = ConfigNamespace(name)
    return configuration_namespaces[name]
1278321
public function load(array $configs, ContainerBuilder $container)
    {
        $fileSrc = dirname($this->reflector->getFileName()) . $this->xmlFilePath;
        $loader  = new XmlFileLoader($container, new FileLocator($fileSrc));
        $loader->load($this->xmlFileName);
    }
529219
public static function get($fileKey, $valueKey)
    {
        if (self::$configurator instanceof ConfiguratorClass) {
            return self::$configurator[$fileKey][$valueKey];
        } else {
            return null;
        }
    }
91516
final public static function getConfig($key = null)
    {
        $calledClass = get_called_class();

        // Load config
        if (!isset(self::$loadedConfigSet[$calledClass]) || null === self::$loadedConfigSet[$calledClass]) {
            self::$loadedConfigSet[$calledClass] = array_merge(self::$configDefault, static::loadConfig());
        }

        // Get config property
        return (null === $key)
            ? self::$loadedConfigSet[$calledClass]
            : self::$loadedConfigSet[$calledClass][$key];
    }
1117665
public function configure(Configuration $configuration)
    {
        foreach ($this->nsMap as $type => $map) {
            if (!count($map)) {
                continue;
            }
            $method = 'get' . ucfirst($type) . 'NamespacesMap';
            if (!method_exists($configuration, $method)) {
                throw new InvalidArgumentException('Invalid type of structure namespaces map: ' . $type);
            }
            /** @var $nsMap Configuration\NamespacesMap */
            $nsMap = $configuration->$method();
            $nsMap->add($map);
        }
    }
895603
public function loadUserByUsername($clientKey): TenantInterface
    {
        $tenant = $this->findTenant($clientKey);
        if (!$tenant) {
            throw new UsernameNotFoundException('Can\'t find tenant with such username');
        }

        return $this->findTenant($clientKey);
    }
569975
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('model.xml');
        $loader->load('form.xml');
        $loader->load('helper.xml');
        $loader->load('reader.xml');
        $loader->load('converter.xml');
        $loader->load('loader.xml');
        $loader->load('manager.xml');
        $loader->load('twig_extension.xml');
        $loader->load('validator.xml');
        $loader->load('cache.xml');

        $this->loadRepository($loader, $container, $config);
        $this->loadManager($loader, $container, $config);
        $this->loadRepoClass($loader, $container, $config);
        $this->loadCachePath($container, $config);
        $this->loadVersionEyeKey($container, $config);
    }
850416
public function loadKeys($configuredKeys, string $usage = null) : void
    {
        foreach ($configuredKeys as $keyData) {
            if (isset($keyData['X509Certificate'])) {
                $key = new X509($keyData);
            } else {
                $key = new Key($keyData);
            }

            if ($usage && !$key->canBeUsedFor($usage)) {
                continue;
            }

            $this->loadedKeys->add($key);
        }
    }
1246474
private function loadAdapter($adapterName, $configName, array $adapterConfig, ContainerBuilder $container)
    {
        if (isset($adapterConfig['service'])) {
            // Custom adapter service.
            $container->setAlias($adapterName, Utility::cleanServiceName($adapterConfig['service']));
            return $this;
        }

        // Built-In Adapter
        switch ($adapterConfig['type']) {
            case 'jsonapiorg':
                $definition = $this->createJsonApiAdapter($configName, $container);
                break;
            default:
                throw new \RuntimeException(sprintf('The adapter type "%s" is currently not supported.', $adapterConfig['type']));
        }
        $container->setDefinition($adapterName, $definition);
        return $this;

    }
601318
static function get($namespace, $name = null, $isall = false)
    {
        $cacheName = 'config:'.$namespace;
        if (!Cache::has($cacheName)) {
            $data = self::setCache($namespace);
        } else {
            $data = Cache::get($cacheName, []);
            if($name) {
                if(!$isall) return isset($data[$name]['value']) ? $data[$name]['value'] : null;
                return isset($data[$name]) ? $data[$name] : [];
            }
        }
        if(!$isall) {
            $rdata = array();
            foreach ($data as $key => $value) {
                $rdata[$key] = $value['value'];
            }
            return $rdata;
        }
        return $data;
    }
409525
public function getConfigurationOptions($configurationName)
    {
        if (!array_key_exists($configurationName, $this->configurations)) {
            $errMsg = sprintf('Invalid configuration name %s', $configurationName);
            throw new Exception\InvalidConfigurationNameException($errMsg);
        }

        return new ConfigurationOptions($this->configurations[$configurationName]);
    }
771233
public function importInExistingWorkspace(Configuration $configuration, Workspace $workspace)
    {
        $root = $this->resourceManager->getResourceFromNode($this->resourceManager->getWorkspaceRoot($workspace));
        $wsRoles = $this->roleManager->getRolesByWorkspace($workspace);
        $entityRoles = [];

        foreach ($wsRoles as $wsRole) {
            $entityRoles[$this->roleManager->getWorkspaceRoleBaseName($wsRole)] = $wsRole;
        }

        $workspace = $this->container->get('claroline.manager.transfert_manager')->importResources(
            $configuration,
            $workspace->getCreator(),
            $root->getResourceNode()
        );

        $this->importRichText();

        return $workspace;
    }
718434
public static function getAdapter(string $configKey = null): AbstractAdapter
    {
        $key = $configKey ?? static::getDefaultAdapterKey();

        if (!isset(static::$adapters[$key])) {
        	$config = static::getConfig()->get($key);

        	if ($config === null) {
        		throw new ConfigException("There is no \"{$key}\" key defined in database config");
	        }

            static::$adapters[$key] = static::resolve($config);
            static::$adapters[$key]->setConfigKey($key);
        }

        return static::$adapters[$key];
    }
1056781
public function getConfig($configKey)
    {
        if (array_key_exists($configKey, $this->config)) {
            return $this->config[$configKey];
        }
        return false;
    }
1042662
public function load($environment, $group, $namespace = null)
    {
        $result = array();

        $db = Database::getActiveConnection();
        $query = $db->createQueryBuilder();

        $query
            ->select('configValue', 'configItem')
            ->from('Config', 'c')
            ->where('configGroup = ?')
            ->setParameter(0, $group);

        if ($namespace) {
            $query->andWhere('configNamespace = ?')->setParameter(1, $namespace);
        } else {
            $query->andWhere('configNamespace = ? OR configNamespace IS NULL')->setParameter(1, '');
        }

        $results = $query->execute();

        while ($row = $results->fetch()) {
            array_set($result, $row['configItem'], $row['configValue']);
        }

        return $result;
    }
1116450
public function getSection(string $key) : ConfigurationBagInterface
    {
        return new ConfigurationBag(isset($this->parameters[$key]) ? $this->parameters[$key] : []);
    }