Boot up Sentry authorization provider
@param  Array $config
971231
public function bootSentry($config){
        $app = $this->app;
        $this->app->container->singleton('sentry', function() use ($app, $config){

            $hasherProvider     = $this->hasherProviderFactory($config);
            $userProvider       = $this->userProviderFactory($hasherProvider, $config);
            $groupProvider      = $this->groupProviderFactory($config);
            $throttleProvider   = $this->throttleProviderFactory($userProvider, $config);

            return new Sentry(
                $userProvider,
                $groupProvider,
                $throttleProvider,
                new NativeSession,
                new NativeCookie,
                $app->request->getIp()
            );
        });
    }
774658
public function bootTwig($config){
        $app    = $this->app;
        $view   = $app->view;

        $view->parserOptions = $config;
        $view->parserExtensions = array(
            new \Slim\Views\TwigExtension(),
            new \SlimStarter\TwigExtension\MenuRenderer()
        );
    }
1013797
public function authenticate(array $config)
    {
        if (!$this->client) {
            throw new InvalidArgumentException('The client instance was not given to the password authenticator.');
        }

        if (!array_key_exists('username', $config) || !array_key_exists('password', $config)) {
            throw new InvalidArgumentException('The password authenticator requires a username and password.');
        }

        $this->client->authenticate(Client::AUTH_HTTP_PASSWORD, $config['username'], $config['password']);

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

		$this->bootstrapped = true;
		$this->bootstrapApplication( $config );
	}
715199
public function initialize(array $config)
    {
        $controller = $this->_registry->getController();
        $this->request = $controller->request;
        $this->response = $controller->response;
        $this->session = $controller->request->session();

        $this->eventManager($controller->eventManager());
        $this->eventManager()->dispatch(new Event('Guardian.getGuestActions', $this));

        if (!self::$_instance) {
            self::$_instance = &$this;
        }
    }
800842
protected function loadConfig(array $config)
	{
		$this->className = $config['class'];
		$this->itemPerPage = (int) $config['item_per_page'];
		$this->maxPageNumber = (int) $config['max_page_number'];		
	}
1314077
protected function assignPermissions(array $config) : void
    {
        $this->stdout("Assign permissions: " . count($config) . "\n", Console::FG_YELLOW);
        foreach ($config as $item) {
            if (!$permission = $this->assignPermission($item)) {
                $this->stdout("\t- error assigned permission: " . Json::encode($item) . "\n", Console::FG_RED);
            }
        }
    }
738219
public function initialize(array $config)
    {
        $this->verifyConfig();

        $this->_table->hasMany($this->getConfig('associationAlias'), [
            'className' => 'Muffin/Tokenize.Tokens',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'foreign_alias' => $this->_table->getAlias(),
                'foreign_table' => $this->_table->getTable(),
            ],
            'dependent' => true,
        ]);
    }
894330
public function initialize(array $config)
    {
        $defaultConfig = [
            'authenticate' => [
                'Form' => [
                    'finder' => 'auth',
                    'userModel' => 'MeCms.Users',
                ],
            ],
            'authError' => __d('me_cms', 'You are not authorized for this action'),
            'authorize' => 'Controller',
            'flash' => [
                'element' => 'MeTools.flash',
                'params' => ['class' => 'alert-danger'],
            ],
            'loginAction' => ['_name' => 'login'],
            'loginRedirect' => ['_name' => 'dashboard'],
            'logoutRedirect' => ['_name' => 'homepage'],
            'unauthorizedRedirect' => ['_name' => 'dashboard'],
        ];

        //The authorization error is shown only if the user is already logged
        //  in and he is trying to do something not allowed
        if (!$this->user('id')) {
            $defaultConfig['authError'] = false;
        }

        $config = array_merge($defaultConfig, $config);

        $this->setConfig($config);

        parent::initialize($config);
    }
75484
protected function writeCloudApiConfig(array $config) {
    if (!is_dir($this->cloudConfDir)) {
      mkdir($this->cloudConfDir);
    }
    file_put_contents($this->cloudConfFilePath, json_encode($config));
    $this->say("Credentials were written to {$this->cloudConfFilePath}.");
  }
745289
public function load(Config $config)
    {
        $sys = new Service\SystemService();

        $config->set('PLATFORM', $sys->getPlatform());
        $config->set('TEMP_DIR', $sys->getTempDirectory());
    }
77116
public function initialize(array $config)
    {
        $this->setController($this->_registry->getController());

        $this->_registerPostTypesFromConfigure();

        $this->_addMenuItems();
    }
602526
public static function load(array $config = [])
    {
        isset($config['sign']) && is_string($config['sign']) ? self::setSign($config['sign']) : null;
        isset($config['default_agent']) && is_string($config['default_agent']) ? self::setDefaultAgent($config['default_agent']) : null;
        isset($config['spare_agents']) && is_array($config['spare_agents']) ? self::setSpareAgents($config['spare_agents']) : null;
        isset($config['agents']) && is_array($config['agents']) ? self::setAgents($config['agents']) : null;
        isset($config['timeout']) && is_int($config['timeout']) ? self::setTimeout($config['timeout']) : null;
        isset($config['connect_timeout']) && is_int($config['connect_timeout']) ? self::setConnectTimeout($config['connect_timeout']) : null;
        isset($config['agent_ext_namespace']) && is_string($config['agent_ext_namespace']) ? self::setAgentExtNamespace($config['agent_ext_namespace']) : null;
    }
968404
public static function run(array &$config) {
		self::$config = $config;
		self::startTemplateEngine ( $config );
		if (isset ( $config ['sessionName'] ))
			USession::start ( $config ['sessionName'] );
		self::forward ( $_GET ['c'] );
	}
1110482
public function load(array $config)
    {
        $config = $this->getParsedConfig(
            $config,
            $this->config,
            $this->yamlConfigMap,
            $this->required
        );
        $this->setParsedConfig($config);

        return $this;
    }
1325782
public function boot(array $configs = [])
    {
        $host = isset($configs['host']) ? $configs['host'] : '127.0.0.1';
        $port = isset($configs['port']) ? $configs['port'] : 11211;
        $memcache = new Memcache();
        $memcache->connect($host, $port);
        $this->setDriver($memcache);
    }
773317
public function authenticate(array $config) {
        if (!$this->client) {
            throw new InvalidArgumentException('The client instance was not given to the application authenticator.');
        }
        if (!array_key_exists('clientId', $config) || !array_key_exists('clientSecret', $config) || !array_key_exists('redirectUri', $config)) {
            throw new InvalidArgumentException('The application authenticator requires a client id, secret and redirect uri.');
        }
        $provider = new Bitbucket([
            'clientId'     => $config['clientId'],
            'clientSecret' => $config['clientSecret'],
            'redirectUri'  => $config['redirectUri']
        ]);
        if (!isset($_GET['code'])) {
            $authUrl = $provider->getAuthorizationUrl();
            \Session::put('oauth2state', $provider->getState());
            header('Location: ' . $authUrl);
            exit;

        } elseif (empty($_GET['state']) || ($_GET['state'] !== \Session::get('oauth2state'))) {
            unset($_SESSION['oauth2state']);
            exit('Invalid state');

        } else {
            $token = $provider->getAccessToken('authorization_code', [
                'code' => $_GET['code']
            ]);
            $this->client->getClient()->addListener(
                new OAuth2Listener(
                    array('access_token' => $token->getToken())
                )
            );
        }
        return $this->client;
    }