Loads the common UI libraries

@param array $config
@return string
517460
public function load($config = array())
    {
        $identifier = $this->getIdentifier();

        $config = new ObjectConfigJson($config);
        $config->append(array(
            'debug' => \Kodekit::getInstance()->isDebug(),
            'package' => $identifier->package,
            'domain'  => $identifier->domain,
            'type'    => $identifier->type,
            'styles' => array(),
        ))->append(array(
            'k_ui_container' => ($config->domain === 'admin' || $config->domain === '') && $config->type === 'com'
        ))->append(array(
            'wrapper_class' => array(
                // Only add k-ui-container for top-level component templates
                ($config->k_ui_container ? 'k-ui-container'.($config->debug ? '' : ' k-no-css-errors') : ''),
                'k-ui-namespace',
                $identifier->type.'_'.$identifier->package
            ),
        ))->append(array(
            'wrapper' => sprintf('<div class="%s">
                <!--[if lte IE 8 ]><div class="old-ie"><![endif]-->
                %%s
                <!--[if lte IE 8 ]></div><![endif]-->
                </div>', implode(' ', ObjectConfig::unbox($config->wrapper_class))
            )
        ));

        $html = '';

        if ($config->styles !== false)
        {
            if ($config->package) {
                $config->styles->package = $config->package;
            }

            if ($config->domain) {
                $config->styles->domain = $config->domain;
            }

            $config->styles->debug = $config->debug;
            $config->styles->decorator = $config->decorator;

            $html .= $this->styles($config->styles);
        }

        $html .= $this->scripts($config);

        if ($config->wrapper) {
            $html .= $this->wrapper($config);
        }

        return $html;
    }
68889
public function load(Config $config)
    {
        $sys    = new Service\SystemService();
        $travis = new Service\TravisService($sys);

        $cfg = $travis->getConfig();

        if (null === $cfg) {
            return;
        }

        $config->set('travis_language', $cfg->get('language'));
        $config->set('travis_script', $cfg->get('script'));
        $config->set('travis_cron', 'cron' === strtolower(getenv('TRAVIS_EVENT_TYPE')));
        $config->set('travis', 'true' === getenv('TRAVIS'));

        if ('true' === getenv('TRAVIS')) {
            // running on Travis-CI platform
            if (0 === strlen($config->get('git_branch', null))) {
                $config->set('git_branch', getenv('TRAVIS_BRANCH'));
            }
        }
    }
362502
public function load($config = array())
    {
	$openid = new LightOpenID();
	if(!empty($config))
	{
	    foreach ($config as $key => $val)
	    {
		$openid->$key = $val;
	    }
	}
	return $openid;
    }
318070
public function loadCachedConfig(array &$config)
    {
        $cacheFilePath = $this->config->getCacheFile();

        if (!file_exists($cacheFilePath)) {
            return false;
        }

        $cachedConfig = include $cacheFilePath;

        if (!is_array($cachedConfig)) {
            return false;
        }

        if (!isset($config['routes'])) {
            $config['routes'] = array();
        }

        $this->merger->merge($cachedConfig, $config['routes']);

        return true;
    }
401729
protected function getRequestConfig(array $config) : array
    {
        if (!empty($this->defaultRequestOptions)) {
            $config = array_replace_recursive($this->defaultRequestOptions, $config);
        }

        return $config;
    }
465405
public function load(array $config, ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/services'));
        $loader->load('montserrat.xml');

        if (isset($config['working_dir'])) {
            $container->setParameter('behat.montserrat.working_dir', $config['working_dir']);
        }

        if (isset($config['prepend_paths'])) {
            $parameterBag = $container->getParameterBag();
            $paths = array();
            foreach ($config['prepend_paths'] as $p) {
                $paths[] = $parameterBag->resolveValue($p); 
            }
            $container->setParameter('behat.montserrat.prepend_path', implode(PATH_SEPARATOR, $paths));
        }
    }
1364674
public function loadConfiguration(array $config = [])
    {
        if (isset($config['login'])) {
            $this->setLogin($config['login']);
        }
        if (isset($config['password'])) {
            $this->setPassword($config['password']);
        }
        if (isset($config['dsn'])) {
            $this->setDSN($config['dsn']);
        }
        return $this;
    }
1022080
public static function ahoy(array $config = [])
    {
        static $inst = null;
        if ($inst === null)
        {
            $inst = new Application();
            $inst->registry = Registry::ahoy();
            $inst->treasureChest = new Container();
            $inst->setConfig($config);
            $env = getenv('APPLICATION_ENV');
            if ($env) {
                $inst->setEnvironment($env);
            }
        }
        return $inst;
    }
997392
public function createLocalAdapter(array $config)
    {
        $permissions = $config['permissions'] ?? [];
        $root = Yii::getAlias($config['root']);

        $links = ($config['links'] ?? null) === 'skip'
            ? LocalAdapter::SKIP_LINKS
            : LocalAdapter::DISALLOW_LINKS;

        return $this->adapt($this->createFlysystem(new LocalAdapter(
            $root, LOCK_EX, $links, $permissions
        ), $config));
    }
917182
public function renderPreloader( $config = [] ) {

		$preloaderView = CodeGenUtil::isAbsolutePath( $this->preloaderView, true ) ? $this->preloaderView : "$this->template/$this->preloaderView";

		return $this->render( $preloaderView, [ 'widget' => $this ] );
	}
1373551
protected function getConfiguredPagesFromPlugin(array $config)
    {
        // check if the tt_content row is available and if not load it manually
        // flexParentDatabaseRow not set can be caused by compatibility6 extension
        if (!isset($config['flexParentDatabaseRow']) ||
            (isset($config['flexParentDatabaseRow']) && !is_array($config['flexParentDatabaseRow']))
        ) {
            $parentRow = BackendUtility::getRecord(
                'tt_content',
                $config['row']['uid']
            );
            if (is_array($parentRow)) {
                $config['flexParentDatabaseRow'] = $parentRow;
            } else {
                // tt_content row not found
                return '';
            }
        }

        $parentRow = $config['flexParentDatabaseRow'];
        $pages = $parentRow['pages'];

        $pids = [];
        if (is_string($pages)) {
            // TYPO3 7.6
            $pagesParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $pages, true);
            foreach ($pagesParts as $pagePart) {
                $a = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $pagePart);
                $b = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('_', $a[0]);
                $uid = end($b);
                $pids[] = $uid;
            }
            return implode(',', $pids);
        }

        // TYPO3 8.7
        foreach ($pages as $page) {
            $pids[] = $page['uid'];
        }
        return implode(',', $pids);
    }
685869
public function parseFuelConfig(array $config)
	{
		$params = array();

		$params['driver'] = $config['type'];

		if ($params['driver'] === 'pdo')
		{
			list($type, $dsn) = explode(':', $config['connection']['dsn'], 2);

			$params['driver'] .= '_' . $type;

			$dsn = explode(';', $dsn);

			foreach ($dsn as $d)
			{
				list($k, $v) = explode('=', $d);

				$params[$k] = $v;
			}
		}
		else
		{
			$params['dbname'] = $config['connection']['database'];
			$params['host'] = $config['connection']['hostname'];
			$params['port'] = Arr::get($config, 'connection.port');
		}

		$params['user'] = Arr::get($config, 'connection.username');
		$params['password'] = Arr::get($config, 'connection.password');
		$params['charset'] = Arr::get($config, 'charset');

		return $params;
	}
352814
public function bootstrap($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'debug' => JFactory::getApplication()->getCfg('debug')
        ));

        $html = '';

        if ($this->getTemplate()->decorator() === 'joomla')
        {
            $config->append([
                'css' => file_exists(JPATH_THEMES.'/'.JFactory::getApplication()->getTemplate().'/enable-koowa-bootstrap.txt')
            ]);

            if ($config->javascript && !static::isLoaded('bootstrap-javascript'))
            {
                $html .= $this->jquery($config);
                JHtml::_('bootstrap.framework');

                static::setLoaded('bootstrap-javascript');

                $config->javascript = false;
            }
        }

        $html .= parent::bootstrap($config);
        return $html;
    }
261935
public static function getPanelNames(array $config) : array
    {
        if (empty($config[self::PANELS])) {
            return [];
        }

        return array_keys($config[self::PANELS]);
    }
31801
public function load(array $files, Config $config = null)
    {
        if (is_null($config)) {
            $config = new Config();
        }

        if (!$this->isValidFileList($files)) {
            throw new \RuntimeException('Invalid config file list given. At least one config file must exist.');
        }

        foreach ($files as $file) {
            if ($this->isFileExisting($file)) {
                $config->merge(
                    $this->loadFile($file)
                );
            }
        }

        return $config;
    }
905337
public static function load(array $config) {
		assert(key_exists("cache_path", $config), "Cache path not set.");
		assert(key_exists("db", $config), "Database config not set");

		$db_conf = $config['db'];

		$ormMemcache = Persistence\OrmMemcache::init($config['cache_path']);

		$dsn = 'mysql:host=' . $db_conf['host'] . ';dbname=' . $db_conf['db'];
		$options = [
			PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8MB4'",
			PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
		];
		$pdo = new PDO($dsn, $db_conf['user'], $db_conf['pass'], $options);

		$database = Persistence\Database::init($pdo);
		$databaseAdmin = Persistence\DatabaseAdmin::init($pdo);

		DependencyManager::addDependency($ormMemcache);
		DependencyManager::addDependency($database);
		DependencyManager::addDependency($databaseAdmin);
	}
550899
protected function getClient(array $config)
    {
        $name = array_get($config, 'adapter');
        $config = $this->manager->getConnectionConfig($name);

        return $this->manager->getFactory()->createAdapter($config);
    }