PHP 5.6.29 Released

La clase Yar_Client

(No hay información de versión disponible, podría estar únicamente en SVN)

Introducción

Sinopsis de la Clase

Yar_Client {
/* Propiedades */
protected $_protocol ;
protected $_uri ;
protected $_options ;
protected $_running ;
/* Métodos */
public void __call ( string $method , array $parameters )
final public __construct ( string $url )
public boolean setOpt ( number $name , mixed $value )
}

Propiedades

_protocol

_uri

_options

_running

Tabla de contenidos

add a note add a note

User Contributed Notes 1 note

up
1
porschegt23 at foxmail dot com
5 months 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);
?>
To Top