silverstripe-framework/api/VersionedRestfulServer.php
Fred Condo d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00

24 lines
467 B
PHP

<?php
/**
* Simple wrapper to allow access to the live site via REST
*
* @package sapphire
* @subpackage integration
*/
class VersionedRestfulServer extends Controller {
static $allowed_actions = array(
'index'
);
function handleRequest($request, $model) {
$this->setModel($model);
Versioned::reading_stage('Live');
$restfulserver = new RestfulServer();
$response = $restfulserver->handleRequest($request, $model);
return $response;
}
}