@param Config $config

@return void
351330
public function load(Config $config)
    {
        $sys = new Service\SystemService();

        $config->set('CWD', $sys->getCurrentWorkingDirectory());
    }
859282
public function setConfig($config, $replace = false) {
        if(!$replace && $this->config) {
            $this->config->setConfig(array_merge($this->config->getConfig(), $config->getConfig()));
        } else {
            $this->config = $config;
        }
    }
1116728
public function loadConfig(array $config)
    {
        $this->config            = $config;
        $this->config['storage'] = rtrim($this->config['storage'], '/').'/';
    }
842661
public function initialize(array $config)
    {
        $config += $this->_defaultConfig;
        $this->config('fields', $this->_resolveFields($config['fields']));
        $this->config('strategy', $this->_resolveStrategy($config['strategy']));
    }
556728
private function setConfig($config)
    {
        $this->securityLevel = $config->config['project']['security_level'];
        if ($config->config['config']) {
            foreach ($config->config['config'] as $k => $v) {
                $this->log->debug("[ CONFIG Params ]" . $k . ": " . $v, []);
                $this->config->$k = $this->setSecurityLevel($v);
                $this->parameters["config"][$k] = $this->setSecurityLevel($v);
            }
        }

    }
1254730
public function set($name = null, $config = null) {
		if (is_array($config)) {
			$this->_configurations[$name] = $config;
			return;
		}
		if ($config === false) {
			unset($this->_configurations[$name]);
		}
	}
763892
public function init($config)
    {
        // init init error
        //default
        $this->config['per_page']       = 10;
        $this->config['item_to_show']   = 2;
        $this->config['skip_item']      = true;
        
        $this->config['first_tag_open'] = "<li>";
        $this->config['first_tag_close']= "</li>";
        
        $this->config['last_tag_open']  = "<li>";
        $this->config['last_tag_close'] = "</li>";
        
        $this->config['prev_tag_open']  = "<li>";
        $this->config['prev_tag_close'] = "</li>";
        $this->config['prev_tag_text']  = "Prev";
        
        $this->config['next_tag_open']  = "<li>";
        $this->config['next_tag_close'] = "</li>";
        $this->config['next_tag_text']  = "Next";
        
        $this->config['cur_tag_open']   = "<li class='active'>";
        $this->config['cur_tag_close']  = "</li>";

        $this->config['link_attribute'] = "class=''";
        $this->config['link_attribute_active'] = "class='active'";
        
        $this->config['num_tag_open']   = "<li>";
        $this->config['num_tag_close']  = "</li>";

        $this->config['skip_tag_open']  = "<li>";
        $this->config['skip_tag_close'] = "</li>";
        $this->config['skip_tag_text']  = "<a href='#'>....</a>";
        $this->config['start_page']     = 0;

        //merge options
        foreach ($config as $key => $value) {
            $this->config[$key]=$value;
        }
        if($this->config['item_to_show']<2)
            $this->config['item_to_show']=2;

        $this->total = intval($config['rows']);
        $this->per_page = intval($config['per_page']);
        $this->current_page = intval($config['current_page']) ;
        $this->base_url = urldecode($config['base_url']);
    }
1328837
public function init( $config = [ ] )
    {
        if ( isset( $config[ 'error_callback' ] ) )
        {
            $this->errorCallback = $config[ 'error_callback' ];
        }

        if ( isset( $config[ 'exception_callback' ] ) )
        {
            $this->exceptionCallback = $config[ 'exception_callback' ];
        }

        if ( isset( $config[ 'shutdown_callback' ] ) )
        {
            $this->shutdownCallback = $config[ 'shutdown_callback' ];

            register_shutdown_function( $this->shutdownCallback );
        }

        set_error_handler( [ $this, 'handleError' ], E_ALL );

        set_exception_handler( [ $this, 'handleException' ] );
    }
921765
public function init( $config = NULL )
    {
        $this->config = $config;

        if ( isset( $config[ 'debug' ] ) )
        {
            $this->debug = $config[ 'debug' ];
        }

        $this->log = $this->filter( self::ON_SET_LOG_FILTER, NULL );

        $this->doAction( self::ON_COMPONENT_INIT_ACTION );
    }
551588
public function setConfig($config = [])
    {
        $this->config = $config;
        $this->debug->debug(__FUNCTION__, 'setConfig: ', $this->config);
    }
212565
public function manipulate(Config $config)
    {
        if ($this->isArrayAppend) {
            $this->appendToArraySetting($config);
        } else {
            $this->setSingleConfigValue($config);
        }
    }
821610
public function setConfiguration($config)
    {
        $this->config = $config;
        $encoded = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        file_put_contents($this->appRoot . '/config.json', $encoded);
    }
1117690
private function configure($config = [])
    {
        $this->config = $config;

        $this->configureVariable('ssl');
        $this->configureVariable('ssl_method');
        $this->configureVariable('ssl_name');
        $this->configureVariable('ssl_verify_sign');
        $this->configureVariable('ssl_verify_peer');
        $this->configureVariable('ssl_verify_depth');
    }
641332
protected function applyConfig(array $config) : void
    {
        $this->applyRules(ArrayHelper::get($config, 'rules', []));
        $this->applyRoles(ArrayHelper::get($config, 'roles', []));
        $this->applyPermissions(ArrayHelper::get($config, 'permissions', []));
    }
1109278
private function setLaravelConfigs(array $config)
    {
        if (empty($config)) {
            return;
        }

        foreach ($config as $name => $value) {
            config([$name => $value]);
        }
    }
844014
public function configure(Config $config)
    {
        parent::configure($config);

        $this->file_name = $this->processMacro($config->getString( 'file_name', '' ));
        $this->logs_dir  = $this->processMacro($config->getString( 'logs_dir', '%SYS_TEMP_DIR%/logs' ));
        $this->line_end  = $this->processMacro($config->getString( 'line_end', self::CRLF ));
    }
585982
public function bootstrap( $config = [] ) {
		if ( $this->isBootstrapped() ) {
			throw new ConfigurationException( static::class . ' already bootstrapped.' );
		}

		$this->bootstrapped = true;
		$this->bootstrapApplication( $config );
	}