Get config instance.

@return Config
177052
public static function getInstance()
    {
        if (self::$_instance === null) {
            self::$_instance = new Config();
            if (self::$_instance->_store === null) {
                self::$_instance->_store = self::$_instance->_setStore();
            }
        }

        return self::$_instance;
    }
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;
	}
487041
public function getConfiguration(){
        $rest = $this->getService( self::API_CONNECTION_CONFIG);
        $rest->GET();

        return $rest->getResult( models\Connection\Config::class);
    }
858197
public static function getInstance($config = null)
    {
        if (!self::$instance) {
            self::$instance = new self($config == null ? ConfigManager::getInstance()->getConfigHashmap() : $config);
        }
        return self::$instance;
    }
1159054
public function getParametersConfig() {
		if ($this->_parametersConfig === null) {
			$this->_parametersConfig     = new Config();
			$this->_parametersConfigLock = true;
		}
		
		return $this->_parametersConfig;
	}
819677
public function getConfig()
    {
        $config = [];
        foreach ($this->providers as $key => $provider) {
            $config[$key] = $provider->getConfig();
        }

        return $config;
    }
1082034
function config()
    {
        if (!$this->configuration || !$this->configuration instanceof Entity)
            $this->configuration = new Entity();

        return $this->configuration;
    }
168273
protected function _getConfig()
    {
        if ($this->config === null) {
            $configFinder = new ConfigFinder();
            $this->config = $configFinder->loadAll();
        }

        return $this->config;
    }
739487
private static function getInstance()
    {
        if (self::$_instance == null) {
            self::$_instance = new Fabricate();
            self::$_instance->config = new FabricateConfig();
            self::$_instance->registry = new FabricateRegistry('Fabricate', null);
            self::$_instance->traits = [];
        }
        return self::$_instance;
    }
887859
public function get_config()
	{
    $this->update();
		$tmp = bbn\x::remove_empty($this->cfg);
    if ( isset($tmp['content']) && \is_array($tmp['content']) ){
      foreach ( $tmp['content'] as $i => $c ){
        if ( \is_object($c) ){
          if (method_exists($c, 'get_config') ){
            $tmp['content'][$i] = $c->get_config();
          }
        }
      }
    }
    return $tmp;
	}
513536
public static Configuration getConfiguration() {
	    if(configuration == null){
            try {
                configuration = (Configuration) getContext().getBean("configuration");
            } catch (BeansException e) {
                LOGGER.error("Can't load config. Error: {}",e ,e);
            }
        }
	    return configuration;
	}
1346382
public static function getInstance() {

		if( !isset( self::$instance ) ) {

			self::$instance	= new SiteProperties();

			self::$instance->init( CoreGlobal::CONFIG_FRONTEND );
		}

		return self::$instance;
	}
277846
public function getEmailConfig()
    {
        $this->email_config['type'] = ee()->config->config['mail_protocol'];
        $this->email_config['port'] = ee()->config->config['smtp_port'];
        if ($this->email_config['type'] == 'smtp') {
            $this->email_config['smtp_options']['host'] = ee()->config->config['smtp_server'];
            $this->email_config['smtp_options']['connection_config']['username'] = ee()->config->config['smtp_username'];
            $this->email_config['smtp_options']['connection_config']['password'] = ee()->config->config['smtp_password'];
            $this->email_config['smtp_options']['port'] = $this->email_config['port'];
        }
        
        $this->email_config['sender_name'] = ee()->config->config['site_label'];
        $this->email_config['from_email'] = ee()->config->config['webmaster_email'];
        
        return $this->email_config;
    }
584163
public function getConfig()
    {
        if ($this->_oConfigObject === null) {
            $this->_oConfigObject = oxRegistry::getConfig();
        }

        return $this->_oConfigObject;
    }
676030
public static function newInstance()
    {
        $config = self::create();

        $config->username = 'null';
        $config->password = 'null';
        $config->credentials = ['null', 'null'];
        $config->bindtoInterface = 'null';
        $config->timeout = 5;

        return $config;
    }
1321526
protected function getOtherConfig()
    {
        if (!isset($this->objOtherConfig)) {
            $this->objOtherConfig = $this
                ->getEnvironment()
                ->getBaseConfigRegistry()
                ->getBaseConfig();

            $this
                ->getPanel()
                ->getContainer()
                ->initialize($this->objOtherConfig, $this);
        }

        return $this->objOtherConfig;
    }
54057
static public function getInstance( $configuration = array() )
    {
        if (empty( self::$instance )) {
            self::$instance = new Config( $configuration );
        }
        return self::$instance;
    }