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
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @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'
|
|
|
|
);
|
|
|
|
|
2011-05-01 07:33:02 +02:00
|
|
|
function handleRequest($request, $model) {
|
|
|
|
$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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|