/**
  * Executes the action
  */
 public function execute()
 {
     $this->response->sendHeader('Location', $this->url);
 }
Beispiel #2
0
    $logsConfig = $configs->get('Logs');
    if (isset($logsConfig['LogTypesLocals'])) {
        FileLogger::setLogsLocals($logsConfig['LogTypesLocals']);
    }
    if (isset($logsConfig['SystemErrorLogs'])) {
        if (isset($logsConfig['SystemErrorLogs']['Activated']) && $logsConfig['SystemErrorLogs']['Activated']) {
            if (!isset($logsConfig['SystemErrorLogs']['File'])) {
                throw new RuntimeException('To activate the system error logs, indicate the file to save logs');
            }
            ini_set('log_errors', true);
            ini_set('error_log', $logsConfig['SystemErrorLogs']['File']);
        }
    }
}
/**
 * Timezone
*/
if ($configs->exists('Timezone')) {
    date_default_timezone_set($configs->get('Timezone'));
}
/**
 * Page encoding
*/
if ($configs->exists('Content-Type')) {
    $response = new Response();
    if ($configs->exists('Charset')) {
        $response->sendHeader('Content-Type', $configs->get('Content-Type') . '; Charset=' . $configs->get('Charset'));
    } else {
        $response->sendHeader('Content-Type', $configs->get('Content-Type'));
    }
}