php: fix examples ClientStub constructor

pull/5583/head
Stanley Cheung 9 years ago
parent fbdf51b07e
commit 7212f16700
  1. 4
      examples/php/greeter_client.php
  2. 4
      examples/php/route_guide/route_guide_client.php

@ -36,7 +36,9 @@ require dirname(__FILE__) . '/vendor/autoload.php';
require dirname(__FILE__) . '/helloworld.php'; require dirname(__FILE__) . '/helloworld.php';
function greet($name) { function greet($name) {
$client = new helloworld\GreeterClient('localhost:50051', []); $client = new helloworld\GreeterClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure()
]);
$request = new helloworld\HelloRequest(); $request = new helloworld\HelloRequest();
$request->setName($name); $request->setName($name);
list($reply, $status) = $client->SayHello($request)->wait(); list($reply, $status) = $client->SayHello($request)->wait();

@ -37,7 +37,9 @@ require dirname(__FILE__) . '/route_guide.php';
define('COORD_FACTOR', 1e7); define('COORD_FACTOR', 1e7);
$client = new routeguide\RouteGuideClient('localhost:50051', []); $client = new routeguide\RouteGuideClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure()
]);
function printFeature($feature) { function printFeature($feature) {
$name = $feature->getName(); $name = $feature->getName();

Loading…
Cancel
Save