Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.497 kB
<?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;
}
}
Jump to Line
Something went wrong with that request. Please try again.