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