mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
0882741f54
semantics, and also to allow a field name called "Model"
24 lines
497 B
PHP
24 lines
497 B
PHP
<?php
|
|
/**
|
|
* Simple wrapper to allow access to the live site via REST
|
|
*
|
|
* @package framework
|
|
* @subpackage integration
|
|
*/
|
|
class VersionedRestfulServer extends Controller {
|
|
|
|
static $allowed_actions = array(
|
|
'index'
|
|
);
|
|
|
|
function handleRequest(SS_HTTPRequest $request, DataModel $model) {
|
|
$this->setDataModel($model);
|
|
Versioned::reading_stage('Live');
|
|
$restfulserver = new RestfulServer();
|
|
$response = $restfulserver->handleRequest($request, $model);
|
|
return $response;
|
|
}
|
|
}
|
|
|
|
|