<commit_before><commit_msg>web service MDL-12886 AMF server<commit_after><?php
/**
 * Created on 01/20/2009
 *
 * AMF Moodle server.
 *
 * @author <NAME>
 */

require_once(dirname(__FILE__) . '/../../config.php');
include "Zend/Loader.php";
Zend_Loader::registerAutoload();
if (empty($CFG->enablewebservices)) {
    die;
}

/*
 * FULL SERVER
 *
 */
//retrieve the api name
$classpath = optional_param(classpath,'user',PARAM_ALPHA);
require_once(dirname(__FILE__) . '/../../'.$classpath.'/external.php');

/// run the server
$server = new Zend_Amf_Server();
$server->setClass($classpath."_external");
$response = $server->handle();
echo $response;
/*
 *

varlog("-- The Moodle AMF server is running --");
//basic test server
$server = new Zend_Amf_Server();
$server->addFunction('hello');
$response = $server->handle();
echo $response;


function hello($name, $greeting = 'The Moodle server say Hi to')
{
    varlog($greeting . ', ' . $name);
    return $greeting . ', ' . $name;
}
*/

?>
{'fraction_non_alphanumeric': 0.19959473150962512, 'fraction_numerical': 0.013171225937183385, 'mean_word_length': 4.092783505154639, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4301350', 'n_tokens_mistral': 351, 'n_tokens_neox': 338, 'n_words': 74}