Get the config

This function will lazy create a config object is one does not exist yet.

@return KObjectConfig
511774
public function getConfig()
    {
        if(!$this->_config instanceof KObjectConfig) {
            $this->_config = new KObjectConfig($this->__config);
        }

        return $this->_config;
    }
520787
public function getConfig()
    {
        $config = parent::getConfig();
        $currentSession = \common_session_SessionManager::getSession();
        if ($currentSession instanceof TaoLtiSession) {
            $launchData = $currentSession->getLaunchData();
            if ($launchData->hasVariable(LtiThemeSwitcher::LTI_VARIABLE)) {
                $config["activeNamespace"] = $launchData->getVariable(LtiThemeSwitcher::LTI_VARIABLE);
            }
        }

        return $config;
    }
913647
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $config = $this->getContainer()->get('configuration');
            $this->_configuration = $config;
        }
        return $this->_configuration;
    }
717604
protected function makeConfig() {
        $this->_checkConfig();

        // Construct the DBConfig object
        $ftpConfig = new FtpConfig();
        $ftpConfig->setHost($this->_config['host']);
        $ftpConfig->setPort($this->_config['port']);
        $ftpConfig->setUser($this->_config['user']);
        $ftpConfig->setPrivateKey($this->_baseDir.'/'.$this->_config['private_key']);
        $ftpConfig->setPublicKey($this->_baseDir.'/'.$this->_config['public_key']);

        return $ftpConfig;
    }
731356
public function getConfig() {
		if ($this->_config !== null) {
			return $this->_config;
		}
		
		// Local config
		if ($this->_configLocal === null && method_exists($this, 'getLocalConfig') && $this->hasConfigsFactory()) {
			$localConfigSrc = $this->getLocalConfig();
			$configsFactory = $this->getConfigsFactory();

			if (is_array($localConfigSrc)) {
				$this->_configLocal = $configsFactory->create($localConfigSrc);
			}
			else if (is_string($localConfigSrc)) {
				$this->_configLocal = $configsFactory->createFromFile($localConfigSrc);
			}
			else {
				throw new NoConfig('Type of a local config\'s source must be an array or a string');
			}
			
			$this->_config = clone $this->_configLocal;
		}

		// Supplied config
		if ($this->_configSupplied === null && $this instanceof LocatorAwareInterface && $this->hasLocator()) {
			$locator  = $this->getLocator();
			$configId = $this->getConfigServiceId();
			
			if ($locator->has($configId)) {
				$this->_configSupplied = $locator->get($configId);
				
				if (! $this->_configSupplied instanceof ConfigInterface) {
					throw new NoConfig('Config must implement the "ConfigInterface"');
				}
			}
		}

		// Merge supplied config
		if ($this->_configSupplied !== null) {
			if ($this->_config === null) {
				$this->_config = clone $this->_configSupplied;
			} else {
				$this->_config = $this->_config->merge($this->_configSupplied);
			}
		}

		// Still no final config ?
		if ($this->_config === null) {
			throw new NoConfig('Unable to provide the config');
		}
		
		return $this->_config;
	}
137079
public function getConfigTree()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('mandango', 'array');

        $rootNode
            ->children()
                ->scalarNode('model_dir')->end()
                ->booleanNode('logging')->end()
                ->scalarNode('default_connection')->end()
            ->end()

            ->fixXmlConfig('extra_config_classes_dir')
            ->children()
                ->arrayNode('extra_config_classes_dirs')
                ->prototype('scalar')->end()
            ->end()
        ;

        $this->addConnectionsSection($rootNode);

        return $treeBuilder->buildTree();
    }
93997
public static function config() {
        $key = explode('\\',get_called_class());
        $key = strtolower(end($key));
        if(isset(Config::$o->$key)) {
            return Config::$o->$key;
        }
        return null;
    }
109975
public static function getInstance()
    {
        if (true === is_null(self::$_instance)) {
            self::$_instance = new self();
            self::$_instance->variables = [];
            self::$_instance->system_errors = [];
            self::$_instance->system_debug = [];
            self::$_instance->variables["config"] = [];
        }

        return self::$_instance;
    }
382162
protected function getConfig()
    {
        if ($this->config !== null) {
            return $this->config;
        }

        $config = $this->merge(
            $this->defaultConfig,
            getValue($this->namespace, $this->composerJson)
        );

        if ($this->presetsPath === null || $config === null) {
            return $this->config = $config;
        }

        $presets = $this->loadPresets(getValue($this->presetsPath, $config, []));
        $presetsConfig = array_reduce($presets, $this->merge, array_shift($presets));

        return $this->config = $this->merge($presetsConfig, $config);
    }
417068
public static function CurrentConfig() {
        if(empty(self::$_currentConfig)) {
            self::$_currentConfig=CodeBankConfig::get()->first();
        }
        
        return self::$_currentConfig;
    }
156034
public function getConfig()
    {
        // Create default keys for the config
        $config = array_merge([
            'width'   => null,
            'height'  => null,
            'options' => null,
        ], $this->config);

        // Add crops
        if ($crop = $this->getAttributeValue('crop_box')) {
            if (!is_array($config['options'])) {
                $config['options'] = [];
            }
            $config['options']['trim_perc'] = [
                round($crop->x1, 4),
                round($crop->y1, 4),
                round($crop->x2, 4),
                round($crop->y2, 4),
            ];
        }

        // Return config
        return $config;
    }
890811
public function fetchConfig()
    {
        if (Cache::has($this->getCacheKey())) {
            return Cache::get($this->getCacheKey());
        }

        return null;
    }
1009151
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $this->_configuration = Configuration::get('config');
        }
        return $this->_configuration;
    }
1108983
private function getConfiguration()
    {
        if (empty($this->configuration)) {
            $this->configuration = unserialize($this->getAsString('uc'));
        }

        return $this->configuration;
    }
1159054
public function getParametersConfig() {
		if ($this->_parametersConfig === null) {
			$this->_parametersConfig     = new Config();
			$this->_parametersConfigLock = true;
		}
		
		return $this->_parametersConfig;
	}
861356
public static function get() {

        $keys = func_get_args();
        $config = self::getConfig();
        $value = $config;

        if (!empty($config) && !empty($keys)) {

            foreach ($keys as $number => $name) {

                if (is_object($value)) {

                    $value = Format::objectToArray($value);
                }

                if ($number == 0 && isset($value[$name])) {

                    $value = $value[$keys[0]];
                } else if ($number != 0 && isset($value[$name])) {

                    $value = $value[$name];
                } else {

                    return false;
                }
            }

            return $value;
        } else if (!empty($config)) {

            return $config;
        }

        return false;
    }
874269
protected function createNewObject()
    {
        $jwkset = new JWKSet();
        for ($i = 0; $i < $this->nb_keys; ++$i) {
            $key = $this->createJWK();
            $jwkset->addKey($key);
        }

        return $jwkset;
    }