MINOR Declared Director::direct() and Director::test() as static functions to avoid confusion

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67301 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-12-03 10:30:25 +00:00 committed by Sam Minnee
parent dd0dbddb4b
commit 9cf909e6ca

View File

@ -87,7 +87,7 @@ class Director {
* @uses handleRequest() rule-lookup logic is handled by this.
* @uses Controller::run() Controller::run() handles the page logic for a Director::direct() call.
*/
function direct($url) {
static function direct($url) {
$req = new HTTPRequest(
(isset($_SERVER['X-HTTP-Method-Override'])) ? $_SERVER['X-HTTP-Method-Override'] : $_SERVER['REQUEST_METHOD'],
$url,
@ -151,7 +151,7 @@ class Director {
* @uses getControllerForURL() The rule-lookup logic is handled by this.
* @uses Controller::run() Controller::run() handles the page logic for a Director::direct() call.
*/
function test($url, $postVars = null, $session = null, $httpMethod = null, $body = null, $headers = null) {
static function test($url, $postVars = null, $session = null, $httpMethod = null, $body = null, $headers = null) {
// These are needed so that calling Director::test() doesnt muck with whoever is calling it.
// Really, it's some inapproriate coupling and should be resolved by making less use of statics
$oldStage = Versioned::current_stage();