public function __construct() { $config = Config::get('application'); Session::start(); if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = stripslashes_deep($_POST); $_GET = stripslashes_deep($_GET); $_COOKIE = stripslashes_deep($_COOKIE); $_REQUEST = stripslashes_deep($_REQUEST); } if (isset($config['response']['defaultHeaders'])) { foreach ($config['response']['defaultHeaders'] as $header) { header($header); } } AbstractDb::$useMemcacheForMetadata = $config['useCache']; Object::$debug = MySQL::$monitorQueries = $config['debug']; Db::setConfig(Config::get('database')); $this->initialize(); }