略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Yar_Client

2024-12-22

The Yar_Client class

(No version information available, might only be in Git)

简介

类摘要

class Yar_Client {
/* 属性 */
protected $_protocol;
protected $_uri;
protected $_options;
protected $_running;
/* 方法 */
public __call(string $method, array $parameters): void
final public __construct(string $url)
public setOpt(number $name, mixed $value): boolean
}

属性

_protocol

_uri

_options

_running

目录

add a noteadd a note

User Contributed Notes 1 note

up
0
porschegt23 at foxmail dot com
5 years ago
A simple example on here:

server.php
<?php
class API {
  
    public function
api($parameter = "", $option = "foo") {
          return
$this->client_can_not_see($parameter);
    }


    public function
doAdd($a = 0, $b = 0) {
          return
$a+$b;
    }
  
    protected function
client_can_not_see( $name ) {
      return
"你好$name~";
    }
}

$service = new Yar_Server ( new API () );
$service->handle ();
?>
client.php
<?php
  $client
= new Yar_Client("http://host/server.php");
 
$result = $client->api("parameter");
  echo
$result.'<hr>';
  echo
$client->doAdd(10, 20);
?>

官方地址:https://www.php.net/manual/en/class.yar-client.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3