(PECL yar >= 1.0.0)
Yar_Server::__construct — 注册 HTTP RPC Server
创建一个 Yar 的 HTTP RPC 服务,参数 $obj 对象的所有公开方法都会被注册为服务函数, 可以被 RPC 调用。
obj一个对象实例, 这个对象的所有公开方法都会被注册为服务函数.
返回一个 Yar_Server 的实例。
示例 #1 Yar_Server::__construct() 示例
<?php
class API {
    /**
     * the doc info will be generated automatically into service info page.
     * @params 
     * @return
     */
    public function some_method($parameter, $option = "foo") {
         return "some_method";
    }
    protected function client_can_not_see() {
    }
}
$service = new Yar_Server(new API());
$service->handle();
?>以上示例的输出类似于:
