RpcClient::send PHP 메소드

send() 공개 메소드

public send ( $data = ['name' => 'userinfo', 'result' => '{"id":37936,"name"=>"zqf",email:"[email protected]"}'] )
    public function send($data = array('name' => 'userinfo', 'result' => '{"id":37936,"name"=>"zqf",email:"[email protected]"}'))
    {
        $this->message = new Bin\rpc\Message($data);
        $this->result = $this->client->sendMessage($this->message);
    }

Usage Example

예제 #1
0
파일: Index.php 프로젝트: qieangel2013/zys
 public function rpcAction()
 {
     //rpc调用
     Yaf_Dispatcher::getInstance()->autoRender(FALSE);
     $sd = new RpcClient();
     $datas = array('name' => 'userinfo', 'result' => '{"id":3,"name"=>"zqf",email:"*****@*****.**"}');
     $sd->send($datas);
     $info = $sd->getresult();
     print_r($info);
     $sd->close();
     exit;
 }