Setup the configured error reporting.

@param Repository $config
163415
private function setupErrorReporting(Repository $config)
    {
        $error_reporting = $config->get('concrete.debug.error_reporting');
        if ((string) $error_reporting !== '') {
            error_reporting((int) $error_reporting);
        }
    }
104081
private function repositoryAlreadySet($config, $repo)
    {
        if (!$config->repositories) {
            return false;
        } else {
            if (in_array($repo, $config->repositories)) {
                return true;
            } else {
                return false;
            }
        }
    }
914490
protected function _initialize(KObjectConfig $config)
    {
        if($config->total != 0)
        {
            $config->limit  = (int) max($config->limit, 0);
            $config->offset = (int) max($config->offset, 0);

            if($config->limit > $config->total) {
                $config->offset = 0;
            }

            if(!$config->limit)
            {
                $config->offset = 0;
                $config->limit  = $config->total;
            }

            $config->count  = (int) ceil($config->total / $config->limit);

            if($config->offset > $config->total) {
                $config->offset = ($config->count-1) * $config->limit;
            }

            $config->current = (int) floor($config->offset / $config->limit) + 1;
        }
        else
        {
            $config->limit   = 0;
            $config->offset  = 0;
            $config->count   = 0;
            $config->current = 0;

            $config->show_pages = false;
        }

        if ($config->count === 1) {
            $config->show_pages = false;
        }

        parent::_initialize($config);
    }
101464
private function validateIncludeRegex($config): void
    {
        if (! Validator::key('include', Validator::stringType())->validate($config)
            && ! Validator::key('include', Validator::nullType())->validate($config)
        ) {
            throw new InvalidConfigException('"include" parameter must be set as a string or a null value.');
        }
    }
748982
private function initializeRequest(Repository $config)
    {
        /*
         * Patch the request, so that it can be seen as if it was an ajax call.
         * This can only be done by patching the superglobals, because we have
         * to consider 3rd party libraries (like Symfony for instance) which use
         * those superglobals.
         */
        if (isset($_POST['__ccm_consider_request_as_xhr']) && $_POST['__ccm_consider_request_as_xhr'] === '1') {
            unset($_POST['__ccm_consider_request_as_xhr']);
            unset($_REQUEST['__ccm_consider_request_as_xhr']);
            $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
        }

        /*
         * ----------------------------------------------------------------------------
         * Set trusted proxies and headers for the request
         * ----------------------------------------------------------------------------
         */
        $trustedProxiesIps = $config->get('concrete.security.trusted_proxies.ips');
        if ($trustedProxiesIps) {
            $proxyHeaders = $config->get('concrete.security.trusted_proxies.headers');
            if (defined(SymphonyRequest::class . '::HEADER_X_FORWARDED_ALL')) {
                // Symphony 3.3+
                if (is_array($proxyHeaders)) {
                    $proxyHeadersBitfield = 0;
                    $legacyValues = [
                        'forwarded' => Request::HEADER_FORWARDED,
                        'client_ip' => Request::HEADER_X_FORWARDED_FOR,
                        'client_host' => Request::HEADER_X_FORWARDED_HOST,
                        'client_proto' => Request::HEADER_X_FORWARDED_PROTO,
                        'client_port' => Request::HEADER_X_FORWARDED_PORT,
                    ];
                    foreach ($proxyHeaders as $proxyHeader) {
                        if (isset($legacyValues[$proxyHeader])) {
                            $proxyHeadersBitfield |= $legacyValues[$proxyHeader];
                        }
                    }
                } else {
                    $proxyHeadersBitfield = (int) $proxyHeaders;
                }
                if ($proxyHeadersBitfield === 0) {
                    $proxyHeadersBitfield = -1;
                }
                Request::setTrustedProxies($trustedProxiesIps, $proxyHeadersBitfield);
            } else {
                // Symphony 3.2-
                if (is_array($proxyHeaders)) {
                    foreach ($proxyHeaders as $key => $value) {
                        Request::setTrustedHeaderName($key, $value);
                    }
                }
                Request::setTrustedProxies($trustedProxiesIps);
            }
        }

        /*
         * ----------------------------------------------------------------------------
         * Obtain the Request object.
         * ----------------------------------------------------------------------------
         */
        $request = Request::getInstance();

        return $request;
    }
317132
private function _errorConfig() {
        //error code config
        $error1 = (object) [
            'code' => 1,
            'resourceId' => false,
            'description' => 'Resource Not Found'
        ];

        $error2 = (object) [
            'code' => 2,
            'resourceId' => false,
            'description' => 'Circular Dependency Detected'
        ];

        $this->_errorCodes = [
            1 => $error1,
            2 => $error2
        ];
    }
783331
protected function setErrorReporting()
    {
        /**
         * Configure how verbose PHP is; Everything except E_STRICT and E_ERROR;
         * we'll let the errorHandler pick up fatal errors
         */

        error_reporting(E_ALL ^ E_STRICT ^ E_ERROR);

        //  Configure whether errors are shown or no
        if (function_exists('ini_set')) {
            switch (Environment::get()) {
                case Environment::ENV_PROD:
                    //  Suppress all errors on production
                    ini_set('display_errors', false);
                    break;
                default:
                    //  Show errors everywhere else
                    ini_set('display_errors', true);
                    break;
            }
        }
    }
297281
public function setConfig(array $config)
    {
        $this->parser->config = $config;
        $this->generator->config = $config;
        $this->registerAssetPipelineFilters();
    }
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);
    }
1013204
protected function setup(array $config = [])
    {
        if (!isset($config['data_provider'])) {
            throw new Exception(translate('{data_provider} must be a DatapPovider objetc'), 500, Exception::BADARGUMENTS);
        } elseif (isset($config['data_provider']) && !($config['data_provider'] instanceof DataProviderInterface)) {
            throw new Exception(translate('{data_provider} must be a DatapPovider objetc'), 500, Exception::BADARGUMENTS);
        }

        if (!isset($config['columns'])) {
            throw new Exception(translate('{columns} must be an array type Column[]'), 500, Exception::BADARGUMENTS);
        }

        parent::setup($config);

        $this->setupColumns();
    }
103590
public function setConfig($config){
        $this->config = $config;
        foreach ($config as $key => $value) {
            $this->app->config($key, $value);
        }
    }
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);
            }
        }
    }
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
942527
protected function setUpGeneralConfigurations(Configuration $config)
    {
        $this->setupAnnotationMetadata();
        $config->setMetadataDriverImpl($this->getMetadataMappingDriver());

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

        $config->setMetadataCacheImpl($this->getMetadataCacheDriver());
    }
951933
private function configure(array $config = []): void
    {
        foreach ($config as $param => $value) {
            $property = $this->toCamelCase($param);
            if (property_exists(self::class, $property)) {
                $this->$property = $value;
            }
        }
    }
1244943
protected function registerMultiSiteTenancy(Repository $config)
    {
        if (!$config->get('tenancy.multi_site.enabled', false)) {
            return;
        }

        if (!$this->app instanceof TenantAwareApplication) {
            throw new \RuntimeException(
                'Multi-site requires updating your bootstrap/app.php to use TenantAwareApplication'
            );
        }

        /*
         * @todo Need a way to detect if RouteServiceProvider (or at least an instance of
         *       Foundation\RouteServiceProvider) has been registered and to fail with a
         *       warning if so.
         */

        $this->registerMultiSiteParticipantRepository($config);
        $this->registerMultiSiteConsoleCommands();
        $this->registerTenantParticipantMappings($config->get('tenancy.multi_site.participant.mappings'));
    }
584075
protected function _initialize(KObjectConfig $config)
    {
        $config->append(array(
            'exception_callbacks' => array(),
            'exception_type'      => self::TYPE_ALL,
            'error_reporting'     => self::ERROR_REPORTING,
            'error_operator'      => true
        ));

        parent::_initialize($config);
    }