PHP code example of orderhandler / dubbo-client

1. Go to this page and download the library: Download orderhandler/dubbo-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

orderhandler / dubbo-client example snippets




$config = [
    'registry' => [
        'type' => \OrderHandler\Dubbo\Discover\ZookeeperDiscover::class,
        'url' => '127.0.0.1:2181',
    ],
    'options' => [
        'version' => null,
        'group' => null,
        'options' => [
            'charset' => 'utf-8'
        ],
    ],
];

$serviceName = 'com.member.MemberService';
$service = \OrderHandler\Dubbo\DubboClientFactory::make($serviceName, $config);
$req = [
    'memberId' => 1,
    'class' => 'com.member.MemberInfoRequestBO'
];
$res = $service->queryMemberInfo($req);

var_dump($res);