GreeterClient.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. // GENERATED CODE -- DO NOT EDIT!
  3. // Original file comments:
  4. // Copyright 2015 gRPC authors.
  5. //
  6. // Licensed under the Apache License, Version 2.0 (the "License");
  7. // you may not use this file except in compliance with the License.
  8. // You may obtain a copy of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS,
  14. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. // See the License for the specific language governing permissions and
  16. // limitations under the License.
  17. //
  18. namespace Helloworld;
  19. /**
  20. * The greeting service definition.
  21. */
  22. class GreeterClient extends \Grpc\BaseStub {
  23. /**
  24. * @param string $hostname hostname
  25. * @param array $opts channel options
  26. * @param \Grpc\Channel $channel (optional) re-use channel object
  27. */
  28. public function __construct($hostname, $opts, $channel = null) {
  29. parent::__construct($hostname, $opts, $channel);
  30. }
  31. /**
  32. * Sends a greeting
  33. * @param \Helloworld\HelloRequest $argument input argument
  34. * @param array $metadata metadata
  35. * @param array $options call options
  36. * @return \Grpc\UnaryCall
  37. */
  38. public function SayHello(\Helloworld\HelloRequest $argument,
  39. $metadata = [], $options = []) {
  40. return $this->_simpleRequest('/helloworld.Greeter/SayHello',
  41. $argument,
  42. ['\Helloworld\HelloReply', 'decode'],
  43. $metadata, $options);
  44. }
  45. }