Returns an instance of the chosen adapter configuration.

@param  string|null $configuration Configuration name
@return mixed
346980
public function instance(?string $configuration = null)
	{
		$configuration = $configuration ?? $this->default;

		if(!isset($this->instances[$configuration]))
		{
			$this->instances[$configuration] = $this->instantiate($configuration);
		}

		return $this->instances[$configuration];
	}
192205
public function getAdapter()
    {
        if (null === $this->adapter) {
            $this->setAdapter($this->config['adapter']);
        }

        return $this->adapter;
    }
928290
protected static function getAdapter(?string $adapter = null): AbstractMailAdapter
    {
        $config = static::getConfig();

        if (static::$firstKey === null) {
            static::$firstKey = $config->getFirstKey();
        }

        $key = $adapter ?? static::$firstKey;
        $configArray = $config->get($key, []);

        if (($configArray['enabled'] ?? false) === true) {
            if (isset($configArray['module'])) {
                Application::registerModule($configArray['module']);
            }

            $className = $configArray['adapter_class'] ?? null;

            if ($className === null) {
                throw new ConfigException("Key 'adapter_class' is not set in mail config={$key}");
            }

            if (!class_exists($className, true)) {
                throw new ConfigException("Unknown mail class={$className} under key={$adapter}");
            }

            return new $className($configArray['options'] ?? []);
        }

        return new Simulate($configArray['options'] ?? []);
    }
410866
public function getConfigOption($key, $default = null)
    {
        if (array_key_exists($key, $this->configuration)) {
            return $this->configuration[$key];
        }

        return $default;
    }
59020
public static function get(array $configuration = array())
    {
        if (extension_loaded('redis')) {
            $redis = new \Redis();
            $redis->connect($configuration[CacheKeys::HOST]);
            $cache = new RedisCache();
            $cache->setRedis($redis);
            return $cache;
        }
    }
388761
public function getConfiguration($key = null)
	{
		if(is_null($key))
		{
			return $this->configuration + $this->core['configuration'];
		}

		$configuration = $this->configuration + $this->core['configuration'];

		if(array_key_exists($key, $configuration))
		{
			return $configuration[$key];
		}

		return null;
	}
380160
protected function getValue(Configuration $configuration, array $params)
  {
    if (array_key_exists(strtolower($configuration->getKey()), $params))
    {
      return $params[strtolower($configuration->getKey())];
    }
    if (array_key_exists(strtolower($configuration->getRenameTo()), $params))
    {
      return $params[strtolower($configuration->getRenameTo())];
    }

    return null;
  }
259291
public function adapter(?string $name = null): AdapterInterface
	{
		$name = $name ?? $this->defaultAdapter;

		return $this->adapters[$name] ?? $this->adapterFactory($name);
	}
858197
public static function getInstance($config = null)
    {
        if (!self::$instance) {
            self::$instance = new self($config == null ? ConfigManager::getInstance()->getConfigHashmap() : $config);
        }
        return self::$instance;
    }
1233067
public function get(string $key)
    {
        $key = strtolower($key);

        if (empty($this->configuration[$key])) {
            $this->loadConfigFile($key);
        }

        return $this->configuration[$key];
    }
282352
public function getConnection($connectionName = null)
    {
        /** @var Configuration $configuration */
        $configuration = $this->get('configuration');
        $connectionName = null !== $connectionName ?: $configuration['connection_name'];
        
        return $this->getConnectionManager()->getConnection($connectionName);
    }
913647
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $config = $this->getContainer()->get('configuration');
            $this->_configuration = $config;
        }
        return $this->_configuration;
    }
350732
public static function adapter($name = null) {
		$config = static::_config($name);

		if ($config === null) {
			throw new ConfigException("Configuration `{$name}` has not been defined.");
		}

		if (isset($config['object'])) {
			return $config['object'];
		}
		$class = static::_class($config, static::$_adapters);
		$settings = static::$_configurations[$name];
		$settings[0]['object'] = static::_initAdapter($class, $config);
		static::$_configurations[$name] = $settings;
		return static::$_configurations[$name][0]['object'];
	}
490650
public static function getConfig($key = null, $default = null)
    {
        if (!is_null($key)) {
            if (false !== Util::path(static::$config, $key, $found)) {
                return $found;
            } else {
                return $default;
            }
        }

        return static::$config;
    }
430809
public function getConfiguration($key = null)
    {
        return isset($this->_args[ $key ]) ? $this->_args[ $key ] : null;
    }
1109165
public function getConfig($key = null) 
    {	
    	if($key!=null && isset($this->_config[$key])) { 
    		
    		return $this->_config[$key];
    	
    	} elseif($key == null) {
    		
            return $this->_config;
    	}

        return null;
    }
1094684
public static function get($key)
    {
        return isset(self::$config[$key]) ? self::$config[$key] : null;
    }