silverstripe-framework/api/VersionedRestfulServer.php

24 lines
497 B
PHP
Raw Normal View History

<?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'
);
2012-04-17 01:51:55 +02:00
function handleRequest(SS_HTTPRequest $request, DataModel $model) {
$this->setDataModel($model);
Versioned::reading_stage('Live');
$restfulserver = new RestfulServer();
$response = $restfulserver->handleRequest($request, $model);
return $response;
}
}