Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.516 kB
<?php
// Fake a current controller. Way harder than it should be
class FakeController extends Controller {
function __construct() {
parent::__construct();
$session = new Session(isset($_SESSION) ? $_SESSION : null);
$this->setSession($session);
$this->pushCurrent();
$this->request = new SS_HTTPRequest(
(isset($_SERVER['X-HTTP-Method-Override'])) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'],
'/'
);
$this->response = new SS_HTTPResponse();
$this->init();
}
}
Jump to Line
Something went wrong with that request. Please try again.