create('SilverStripe\\Control\\Session', isset($_SESSION) ? $_SESSION : array()); $this->setSession($session); $this->pushCurrent(); $request = new SS_HTTPRequest( (isset($_SERVER['X-HTTP-Method-Override'])) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'], '/' ); $this->setRequest($request); $this->setResponse(new SS_HTTPResponse()); $this->doInit(); } }