<?php
class API {
public function some_method($parameter, $option = "foo") {
return "some_method";
}
/*
* Must be protected. It is called on GET requests with the markup of
* the page Yar would otherwise render, and its string return value is
* sent to the client instead.
*/
protected function __info($markup) {
return "Hello world";
}
}
$service = new Yar_Server(new API());
$service->handle();
?>