mirror of
https://github.com/moodle/moodle.git
synced 2025-02-24 03:53:49 +01:00
* Remove description array => all these information are now into the phpdoc. Remove all call/reference to moodleexternal.php * Adapt our own REST server to these changes * Remove Zend REST server as it's going to be deprecated in Zend Framework 1.8 * Remove our own SOAP server as we use the Zend SOAP server
59 lines
1.5 KiB
PHP
59 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Moodle - Modular Object-Oriented Dynamic Learning Environment
|
|
* http://moodle.com
|
|
*
|
|
* LICENSE
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details:
|
|
*
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
*
|
|
* @category Moodle
|
|
* @package webservice
|
|
* @copyright Copyright (c) 1999 onwards Martin Dougiamas http://dougiamas.com
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL License
|
|
*/
|
|
|
|
require_once($CFG->dirroot.'/webservice/lib.php');
|
|
|
|
/*
|
|
* Rest server class
|
|
*/
|
|
final class rest_server extends webservice_server {
|
|
|
|
public function __construct() {
|
|
|
|
$this->set_protocolname("Rest");
|
|
}
|
|
|
|
/**
|
|
* Run REST server
|
|
*/
|
|
public function run() {
|
|
$enable = $this->get_enable();
|
|
if (empty($enable)) {
|
|
die;
|
|
}
|
|
|
|
require_once('locallib.php');
|
|
//retrieve path and function name from the URL
|
|
$rest_arguments = get_file_argument('server.php');
|
|
header ("Content-type: text/xml");
|
|
echo call_moodle_function($rest_arguments);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|