src/CarteBlanche/App/Kernel.php
private function __setMode($mode = 'dev')
    {
        $config = $this->getContainer()->get('config');
        $mode_data = $config->get('carte_blanche.modes', array(), 'app');

        if (array_key_exists($mode, $mode_data)) {
            $this->mode = strtolower($mode);
        } else {
            $this->mode = isset($mode_data['default']) ? strtolower($mode_data['default']) : 'dev';
        }

        if (isset($mode_data[$this->mode])) {
            $this->mode_data = $mode_data[$this->mode];
            if (isset($this->mode_data['display_errors'])) {
                @ini_set('display_errors',$this->mode_data['display_errors']);
            }
            if (isset($this->mode_data['error_reporting'])) {
                @error_reporting($this->mode_data['error_reporting']);
            }
            if (isset($this->mode_data['debug']) && $this->mode_data['debug']) {
                $this->setDebug(true);
            } else {
                $this->setDebug(false);
            }
        }
        return $this;
    }
private function __setMode($mode = 'dev')
    {
        $config = $this->getContainer()->get('config');
        $mode_data = $config->get('carte_blanche.modes', array(), 'app');

        if (array_key_exists($mode, $mode_data)) {
            $this->mode = strtolower($mode);
        } else {
            $this->mode = isset($mode_data['default']) ? strtolower($mode_data['default']) : 'dev';
        }

        if (isset($mode_data[$this->mode])) {
            $this->mode_data = $mode_data[$this->mode];
            if (isset($this->mode_data['display_errors'])) {
                @ini_set('display_errors',$this->mode_data['display_errors']);
            }
            if (isset($this->mode_data['error_reporting'])) {
                @error_reporting($this->mode_data['error_reporting']);
            }
            if (isset($this->mode_data['debug']) && $this->mode_data['debug']) {
                $this->setDebug(true);
            } else {
                $this->setDebug(false);
            }
        }
        return $this;
    }
Define the current kernel mode

Launch settings according to the MODE config entry

@param string $mode
@return self