Load grid configuration.

@param  Repository  $config

@return void
504631
public function initiate(Repository $config)
    {
        if (extension_active('tester')) {
            try {
                $this->generator = app(\Antares\Tester\Builder\Generator::class);
            } catch (Exception $ex) {
                
            }
        }
        $this->fieldsets = new Collection();
        foreach ($config->get('antares/html::form', []) as $key => $value) {
            if (property_exists($this, $key)) {
                $this->{$key} = $value;
            }
        }

        $this->row = [];
    }
1118355
public function loadConfig($config = null): void
    {
        $baseClass = Base::getInstance();
        $this->errorLevel = (string)$baseClass->Database->MySQL->errorLevel;

        if (\is_null($config)) {
            $config = $baseClass->Database->MySQL->defaultConnection;
        }
        if (!($config instanceof AbstractConfig)) {
            throw new RuntimeException('$config must be an instance of MS\LightFramework\Config\AbstractConfig');
        }

        $this->databaseHost = (string)$config->databaseHost;
        $this->databaseUser = (string)$config->databaseUser;
        $this->databasePass = (string)$config->databasePass;
        $this->databaseName = (string)$config->databaseName;
        $this->connectionCharset = (string)$config->connectionCharset;
        $this->connectionCollation = (string)$config->connectionCollation;

        $this->openConnection();
        $this->selectDatabase($this->databaseName);
        $this->setConnectionCharset($this->connectionCharset);
        $this->setConnectionCollation($this->connectionCollation);
    }
163415
private function setupErrorReporting(Repository $config)
    {
        $error_reporting = $config->get('concrete.debug.error_reporting');
        if ((string) $error_reporting !== '') {
            error_reporting((int) $error_reporting);
        }
    }
44397
private function handleRepositoryConfig($config)
    {
        $count = 0;
        if (is_array($config) && array_key_exists('repositories', $config)) {
            foreach ($config['repositories'] as $repoName => $repoConf) {
                $repoConf = $this->configurator->resolveRepositoryConfig($repoConf);
                $repository = $this->addRepository($repoName, $repoConf['path'], $repoConf['options'], $repoConf['commands']);
                ++$count;

                // adding branches
                if (array_key_exists('branch', $repoConf)) {
                    foreach ($repoConf['branch'] as $branchName => $branchOptions) {
                        $branchOptions = $this->configurator->resolveBranchConfig($branchOptions);
                        $repository->addBranch($branchName, $branchOptions['commands'], $branchOptions['path'], $branchOptions['options']);
                    }
                }
            }
        }

        return $count;
    }
185215
public function setupPlugin(array $config = []): void
	{
		if (!$this->defaults) return;
		$this->setupConfig($this->defaults, $config);
	}
1195472
protected function _initialize(AnConfig $config)
    {
        if ($config->repository) {
            $config->append(array(
                'identifier' => $config->repository->getDescription()->getInheritanceColumnValue()->getIdentifier(),
                'node_type' => (string) $config->repository->getDescription()->getInheritanceColumnValue(),
                'commentable' => $config->repository->isCommentable(),
                'ownable' => $config->repository->isOwnable(),
                'hashtagable' => $config->repository->isHashtagable(),
                'geolocatable' => $config->repository->isGeolocatable()
            ));
        }

        parent::_initialize($config);
    }
585982
public function bootstrap( $config = [] ) {
		if ( $this->isBootstrapped() ) {
			throw new ConfigurationException( static::class . ' already bootstrapped.' );
		}

		$this->bootstrapped = true;
		$this->bootstrapApplication( $config );
	}
953625
protected function loadRepoClass($loader, ContainerBuilder $container, array $config)
    {

        if (isset($config['repository']['repo']['class'])) {
            $container->setParameter('snide_travinizer.model.repo.class', $config['repository']['repo']['class']);
        }
    }
133677
public function loadConfig($name)
    {
        // only if config not yet exists
        if (!$this->configExists($name))
            $this->config[$name] = $this->getConfigObjectFromDatabase($name);
    }
37168
public function load(Config $config)
    {
        $config->setDefault('project_source_dir', 'project');
        $config->setDefault('deploying_repo', 'git@github.com:itiqiti/deploying.git');

        $config->setDefault('itq_deployable', 'true' === getenv('TRAVIS') && in_array(getenv('TRAVIS_PULL_REQUEST'), ['false', false]) && in_array(getenv('TRAVIS_BRANCH'), ['develop', 'release', 'master']));

        $config->setDefaultItem('commands', '_build-project-images', "#build-project-images");
        $config->setDefaultItem('commands', '_project-backup', "!rsync -a --exclude={{project_source_dir}} . {{project_source_dir}} --delete-after");
        $config->setDefaultItem('commands', '_pre-deploy', "#pre-deploy");
        $config->setDefaultItem('commands', '_prepare-deploy', "#prepare-deploy");
        $config->setDefaultItem('commands', 'ci', ["@test", "@csx"]);
        $config->setDefaultItem('commands', 'build', "@ci");
        $config->setDefaultItem('commands', '_gandi-deploy', "#deploy-with-deployer");
        $config->setDefaultItem('commands', 'init', '#init');

        if (is_file(getcwd().'/.travis.yml')) {
            $config->setDefaultItem('commands', '_travis-pre-deploy', "#travis-pre-deploy");
            $config->setDefaultItem('commands', '_travis-trigger', "#travis-trigger");
        }
    }
944103
protected function loadConfigurationFiles(Application $app, Config $repository)
    {
        Factory::fromFiles($repository, $this->getConfigurationFiles($app));
    }
806466
public function loadEnvironmentConfigurations($app, RepositoryContract $repository)
    {
        $configPath = realpath($app->environmentPath());

        $files = $this->getConfigurationFilesInPath($configPath);

        foreach ($files as $scope => $path) {
            $items = require $path;

            foreach ($items as $key => $value) {
                $key = "{$scope}.{$key}";

                // We can use a Closure as the value, and it will be called with
                // the default configuration item. It useful for replace configurations
                // defined as array or other complex form.
                if ($value instanceof Closure) {
                    $value = $value($repository->get($key), $app);
                }

                // We can specify a deep-level configuration item using the dot in key,
                // and just to change the item.
                $repository->set($key, $value);
            }
        }
    }
720098
public function setConfig($config)
    {
        if (is_array($config)) {
            $this->config = new Config($config);
        } else {
            // see if it's a file path
            if (is_file($config)) {
                $cfg = parse_ini_file($config, true);
                $this->config = new Config($cfg);
            } else {
                throw new \InvalidArgumentException(
                    'Could not load configuration file '.$config
                );
            }
        }
    }
897112
protected function setUpGeneralConfigurations(Configuration $config)
    {
        $this->setupAnnotationMetadata();
        $config->setMetadataDriverImpl($this->getMetadataMappingDriver());

        $config->setProxyDir($this->getProxiesPath());
        $config->setProxyNamespace($this->getProxiesNamespace());
        $config->setAutoGenerateProxyClasses($this->getProxiesAutoGeneration());

        if ($this->getRepositoryFactory() !== null) {
            $config->setRepositoryFactory($this->getRepositoryFactory());
        }

        if ($this->getDefaultRepositoryClass() !== null) {
            $config->setDefaultRepositoryClassName($this->getDefaultRepositoryClass());
        }

        $config->setMetadataCacheImpl($this->getMetadataCacheDriver());
    }
856606
public function load(Config $config)
    {
        if (null === $config) {
            $config = new Config();
        }

        $this->loadExtensions($config);

        return $this
            ->applyCommands($config)
            ->applyHooks($config)
        ;
    }
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
1021584
protected function registerFacadeAliases(Repository $config)
    {
        $loader = AliasLoader::getInstance();

        foreach ($this->getComponentsFromConfig($config, 'facades', getenv('APP_ENV')) as $alias => $facade) {
            $loader->alias($alias, $facade);

            $config->set('app.aliases.' . $alias, $facade);
        }
    }