regsiterConfigDrivers

@access protected
@return void
769547
protected function regsiterConfigDrivers()
    {
        // register xml config dirvers
        $me          = $this;
        $base        = $this->app['config']->get('xmlconf::basedir', array());
        $cacheDriver = $this->app['config']->get('cache.driver', 'file');

        foreach ($this->app['config']->get('xmlconf::namespaces', array()) as $reader => $namespace) {

            $this->checkBaseDir($reader, $base);

            $this->app['xmlconf.' . $reader] = $this->app->share(function ($app) use ($me, $base, $reader, $namespace, $cacheDriver)
            {
                $class     = $me->getReaderClass($reader, $namespace);
                $cache     = new Cache\Cache($app['cache']->driver($cacheDriver), $reader);
                $xmlreader = new $class(

                    $cache,
                    $me->getSimpleXmlClass($reader, $namespace),
                    $me->getConfPath($reader),
                    $me->getSchemaPath($reader, $base[$reader])

                );

                return $xmlreader;
            });
        }
    }
390762
static private function bootstrap()
    {
        if (self::$expressions === null) {
            $configuration = new Configuration();
            $parameters = $configuration->getConfig();
            self::$expressions = $configuration->setUp($parameters);
        }
    }
353065
protected function setOverrides()
    {
        $config = $this->app['config']->get('cartalyst.sentinel');

        $users = $config['users']['model'];

        $roles = $config['roles']['model'];

        $persistences = $config['persistences']['model'];

        if (class_exists($users)) {
            if (method_exists($users, 'setRolesModel')) {
                forward_static_call_array([ $users, 'setRolesModel' ], [ $roles ]);
            }

            if (method_exists($users, 'setPersistencesModel')) {
                forward_static_call_array([ $users, 'setPersistencesModel' ], [ $persistences ]);
            }

            if (method_exists($users, 'setPermissionsClass')) {
                forward_static_call_array([ $users, 'setPermissionsClass' ], [ $config['permissions']['class'] ]);
            }
        }

        if (class_exists($roles) && method_exists($roles, 'setUsersModel')) {
            forward_static_call_array([ $roles, 'setUsersModel' ], [ $users ]);
        }

        if (class_exists($persistences) && method_exists($persistences, 'setUsersModel')) {
            forward_static_call_array([ $persistences, 'setUsersModel' ], [ $users ]);
        }
    }
1024567
private static function initializeConfigurations()
    {
        if (!is_readable(self::CONFIGURATION_PATH)) {
            throw new \RuntimeException("Cannot parse configurations file (config.ini)");
        }
        self::$configurationFile = new ConfigurationFile(self::CONFIGURATION_PATH);
    }
727288
protected function configureLoggers()
    {
        $loggers = array();
        foreach ($this->extractConfig('logging') as $name => $config) {
            $logger = LoggerBase::factory($name);
            $logger->configure((array)$config);
            $logger->initialize();
            $logKey = isset($config['name']) ? $config['name'] : $name;
            $loggers[$logKey] = $logger;
        }

        if (Strata::isBundledServer()) {
            $logger = LoggerBase::factory('Console');
            $logger->initialize();
            $loggers['StrataConsole'] = $logger;
        }

        $this->setConfig('runtime.loggers', $loggers);
    }
375949
protected function regsiterCommands()
    {
        $this->app['command.jitimage.clearcache'] = $this->app->share(
            function ($app) {
                return new Console\JitImageCacheClearCommand($app['jitimage.cache']);
            }
        );

        $this->commands('command.jitimage.clearcache');
    }
426903
function parseDriverConfig() {
  var cfg, def, x, y, z,
      config = this.config.drivers,
      drivers = this.drivers;
  
  if (!config) config = this.config.drivers = {};
  
  if (Object.keys(config).length === 0) return;

  for (x in config) {
    cfg = config[x];
    if (x == 'default') { def = cfg; continue; }
    for (y in cfg) {
      if (typeof cfg[y] == 'object') {
        if (typeof drivers[x] == 'undefined') drivers[x] = {};
        drivers[x][y] = [x, cfg[y]];
      } else {
        drivers[x] = [x, cfg];
        break;
      }
    }
  }

}
150169
public function applyEditSettings()
    {
        $this->applyDetailSettings();

        $this->set('gtf_id_field',          'elementClass', 'Hidden');
        $this->set('gtf_id_track',          'elementClass', 'Exhibitor');
        $this->set('gtf_field_type',        'elementClass', 'Exhibitor');

        $this->set('gtf_field_name',        'elementClass', 'Text',
                'size', '30',
                'minlength', 2,
                'required', true,
                'validator', $this->createUniqueValidator(array('gtf_field_name', 'gtf_id_track'))
                );

        $this->set('gtf_id_order',          'elementClass', 'Text',
                'validators[int]',    'Int',
                'validators[gt]',     new \Zend_Validate_GreaterThan(0),
                'validators[unique]', $this->createUniqueValidator(array('gtf_id_order', 'gtf_id_track'))
                );

        $this->set('gtf_field_code',        'elementClass', 'Text', 'minlength', 4);
        $this->set('gtf_field_description', 'elementClass', 'Text', 'size', 30);
        $this->set('gtf_field_values',      'elementClass', 'Hidden');
        $this->set('gtf_field_default',     'elementClass', 'Hidden');

        $this->set('gtf_to_track_info',     'elementClass', 'CheckBox',
                'onclick', 'this.form.submit();'
                );
        $this->set('gtf_track_info_label',  'elementClass', 'CheckBox',
                'required', false);
        $this->set('gtf_required',          'elementClass', 'CheckBox');
        $this->set('gtf_readonly',          'elementClass', 'CheckBox');

        $this->set('gtf_filter_id',         'elementClass', 'Hidden');
        $this->set('gtf_min_diff_length',   'elementClass', 'Hidden');
        $this->set('gtf_min_diff_unit',     'elementClass', 'Hidden');
        $this->set('gtf_max_diff_length',   'elementClass', 'Hidden');
        $this->set('gtf_max_diff_unit',     'elementClass', 'Hidden');
        $this->set('gtf_after_next',        'elementClass', 'None');  // Deprecatedin 1.7.1
        $this->set('gtf_uniqueness',        'elementClass', 'Hidden');

        $this->set('gtf_create_track',      'elementClass', 'Hidden');
        $this->set('gtf_create_wait_days',  'elementClass', 'Hidden');

        $class      = 'Model\\Dependency\\FieldTypeChangeableDependency';
        $dependency = $this->tracker->createTrackClass($class, $this->_modelField);
        $this->addDependency($dependency);
    }
876419
private function configureMailSettings ()
    {
        $this->comment ('Configure mail driver settings');

        $choice = $this->choice ("Choose MAIL DRIVER. [log|mandrill|mailgun|sparkpost|set_up_later]", ['log', 'mailgun', 'mandrill', 'sparkpost', 'set_up_later'], 0);

        switch ($choice) {

            case 'log' :
                $this->envData['MAIL_DRIVER'] = 'log';

                break;

            case 'mandrill' :
                $this->envData['MAIL_DRIVER']     = 'mandrill';
                $this->envData['MANDRILL_SECRET'] = $this->ask ("Mandrill secret code: ") . "\n\n";

                break;

            case 'mailgun' :
                $this->envData['MAIL_DRIVER']    = 'mailgun';
                $this->envData['MAILGUN_DOMAIN'] = $this->ask ("Mailgun domain: ");
                $this->envData['MAILGUN_SECRET'] = $this->ask ("Mailgun secret: ") . "\n\n";

                break;

            case 'sparkpost' :
                $this->envData['MAIL_DRIVER']      = 'sparkpost';
                $this->envData['SPARKPOST_SECRET'] = $this->ask ("Sparkpost secret: ") . "\n\n";

                break;

            default:
                break;
        }
    }
70743
protected function configure(): void
    {
        // eg. IndexConfigure() for indexCommand()
        $method = $this->action . 'Configure';

        if (\method_exists($this, $method)) {
            $this->$method();
        }
    }
170447
public function config() {
        $config = Configure::read();
        unset($config['debug']);
        ksort($config);

        $this->set('configuration', $config);
    }
708023
protected function configure()
    {
        $this->value('builder', $this->builder);
        $this->value('frameworkBuilder', $this->builder->frameworkBuilder());
        $this->value('components', $this->builder->components());
    }
155605
public function loadConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$config = $this->getConfig($this->defaults);

		$reader = $builder->addDefinition($this->prefix('delegatedReader'))
			->setFactory(AnnotationReader::class)
			->setAutowired(false);

		foreach ((array) $config['ignore'] as $annotationName) {
			$reader->addSetup('addGlobalIgnoredName', [$annotationName]);
			AnnotationReader::addGlobalIgnoredName($annotationName);
		}

		$this->loadCacheConfiguration();

		$builder->addDefinition($this->prefix('reader'))
			->setType(Reader::class)
			->setFactory(CachedReader::class, [
				$this->prefix('@delegatedReader'),
				$this->prefix('@cache'),
				$config['debug'],
			]);

		AnnotationRegistry::registerUniqueLoader('class_exists');
	}
414176
protected function configure()
    {
        $config = $this->config->get('app');

        $this->charset = $config['charset'];
        mb_internal_encoding($this->charset);

        date_default_timezone_set($config['timezone']);
    }
1288984
protected function attachDrivers()
    {
        $drivers = $this->getDrivers();
        foreach ($drivers as $driver) {
            $handler = $this->getHandlerInstanceByName($driver);
            $this->attachHandler($handler);
        }
    }
852011
protected function initializeRoutesConfiguration()
    {
        if ($this->routesConfiguration === null) {
            $this->routesConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_ROUTES);
        }
    }
912037
public function index() {
		$this->disableCache();
		$defaultConfig = $this->Setting->getDefaultConfig();
		$currentConfig = (array)$this->Setting->getConfig();
		$configUIlangs = $this->ConfigSettingsApp->getFlagConfigUiLangs();
		$configSMTP = $this->ConfigSettingsApp->getFlagConfigSmtp();
		$configAcLimit = $this->ConfigSettingsApp->getFlagConfigAcLimit();
		$configADsearch = $this->ConfigSettingsApp->getFlagConfigADsearch();
		$configExtAuth = $this->ConfigSettingsApp->getFlagConfigExtAuth();
		$authGroups = $this->ConfigSettingsApp->getAuthGroups();
		$groupList = $this->Ldap->getGroupList();
		$containerList = $this->Ldap->getTopLevelContainerList();
		$currLanguage = Hash::get($currentConfig, 'Setting.Language');
		$languages = $this->Setting->getUiLangsList();
		$schema = $this->Setting->getFullSchema();
		$passFields = [];
		foreach ($schema as $field => $metadata) {
			if (mb_stripos($field, 'password') !== false) {
				$passFields[] = $field;
			}
		}
		if ($this->request->is(['post', 'put'])) {
			foreach ($passFields as $passField) {
				if (mb_stripos($field, '_confirm') !== false) {
					continue;
				}

				$currPass = $this->request->data('Setting.' . $passField);
				$prevPpass = (string)Hash::get($currentConfig, 'Setting.' . $passField);
				if (empty($currPass) && !empty($prevPpass)) {
					$this->request->data('Setting.' . $passField, $prevPpass);
					$this->request->data('Setting.' . $passField . '_confirm', $prevPpass);
				}
			}
			$country = $this->request->data('Setting.Language');
			$language = $this->Setting->getLanguageByCountryCode($country);
			$this->request->data('Setting.Language', $language);
			if ($this->Setting->save($this->request->data)) {
				$this->Flash->success(__d('cake_settings_app', 'Application settings has been saved.'));
				if ($currLanguage !== $language) {
					$this->Flash->information(__d('cake_settings_app', 'Reload the page to apply the settings.'));
				}
				if (!$this->Session->read('Settings.FirstLogon')) {
					$this->ViewExtension->setProgressSseTask('ClearCache');
				}

				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error(__d('cake_settings_app', 'Unable to save application settings.'));
			}
		} else {
			$appSetting = Hash::merge(
				$defaultConfig,
				$currentConfig
			);
			$this->request->data('Setting', $appSetting['Setting']);
			$this->Setting->createValidationRules();
		}
		foreach ($passFields as $passField) {
			$this->request->data('Setting.' . $passField, '');
			$this->request->data('Setting.' . $passField . '_confirm', '');
		}

		$country = $this->Setting->getCountryCodeByLanguage($currLanguage);
		$this->request->data('Setting.Language', $country);
		$varsExt = $this->Setting->getVars();

		$pageHeader = __d('cake_settings_app', 'Application settings');
		$breadCrumbs = $this->Setting->getBreadcrumbInfo();
		$breadCrumbs[] = __d('cake_settings_app', 'Settings');

		$this->set(compact(
			'groupList',
			'containerList',
			'configUIlangs',
			'configSMTP',
			'configAcLimit',
			'configADsearch',
			'configExtAuth',
			'authGroups',
			'languages',
			'varsExt',
			'pageHeader',
			'breadCrumbs'
		));
	}