mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-26 20:45:47 +02:00
BUG Disabled disruptive test case in DirectorTest API RequestProcessor and VersionedRequestFilter now both correctly implement RequestFilter Better PHPDoc on RequestFilter and implementations
20 lines
452 B
PHP
20 lines
452 B
PHP
<?php
|
|
/**
|
|
* Initialises the versioned stage when a request is made.
|
|
*
|
|
* @package framework
|
|
* @subpackage control
|
|
*/
|
|
class VersionedRequestFilter implements RequestFilter {
|
|
|
|
public function preRequest(SS_HTTPRequest $request, Session $session, DataModel $model) {
|
|
Versioned::choose_site_stage($session);
|
|
return true;
|
|
}
|
|
|
|
public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model) {
|
|
return true;
|
|
}
|
|
|
|
}
|