public function setup()
    {
        $this->request = new Request();
        $this->response = new Response();
        $this->env = new Environment();
        $this->mode = $this->env->getMode();
        if (!$this->env->isProduction() || $this->cache == null) {
            $this->cache = new AdapterNull();
        }
        $this->loadPackages();
        $this->loadConfig();
        // @codeCoverageIgnoreStart
        if (array_key_exists('ini.set', $this->config)) {
            foreach ($this->config['ini.set'] as $iniName => $iniValue) {
                ini_set($iniName, $iniValue);
            }
        }
        // @codeCoverageIgnoreEnd
        $this->loadRoutes();
        $this->isSetup = true;
    }