2009-03-10 23:08:52 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Simple wrapper to allow access to the live site via REST
|
2009-03-22 23:59:14 +01:00
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2009-03-22 23:59:14 +01:00
|
|
|
* @subpackage integration
|
2009-03-10 23:08:52 +01:00
|
|
|
*/
|
|
|
|
class VersionedRestfulServer extends Controller {
|
2011-02-13 23:14:51 +01:00
|
|
|
|
|
|
|
static $allowed_actions = array(
|
|
|
|
'index'
|
|
|
|
);
|
|
|
|
|
2012-04-17 01:51:55 +02:00
|
|
|
function handleRequest(SS_HTTPRequest $request, DataModel $model) {
|
2011-05-01 07:33:02 +02:00
|
|
|
$this->setModel($model);
|
2009-03-10 23:08:52 +01:00
|
|
|
Versioned::reading_stage('Live');
|
|
|
|
$restfulserver = new RestfulServer();
|
2011-05-01 07:33:02 +02:00
|
|
|
$response = $restfulserver->handleRequest($request, $model);
|
2009-03-10 23:08:52 +01:00
|
|
|
return $response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-12 21:22:11 +01:00
|
|
|
|