Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Unified Diff: third_party/grpc/examples/php/helloworld.php

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/grpc/examples/php/greeter_client.php ('k') | third_party/grpc/examples/php/helloworld.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/examples/php/helloworld.php
diff --git a/third_party/grpc/examples/php/helloworld.php b/third_party/grpc/examples/php/helloworld.php
new file mode 100644
index 0000000000000000000000000000000000000000..50923e6fcdc1afca71f4e702993b9e9b1610fcbb
--- /dev/null
+++ b/third_party/grpc/examples/php/helloworld.php
@@ -0,0 +1,158 @@
+<?php
+// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
+// Source: helloworld.proto
+// Date: 2015-09-24 20:40:14
+
+namespace helloworld {
+
+ class HelloRequest extends \DrSlump\Protobuf\Message {
+
+ /** @var string */
+ public $name = null;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloRequest');
+
+ // OPTIONAL STRING name = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "name";
+ $f->type = \DrSlump\Protobuf::TYPE_STRING;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <name> has a value
+ *
+ * @return boolean
+ */
+ public function hasName(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <name> value
+ *
+ * @return \helloworld\HelloRequest
+ */
+ public function clearName(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <name> value
+ *
+ * @return string
+ */
+ public function getName(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <name> value
+ *
+ * @param string $value
+ * @return \helloworld\HelloRequest
+ */
+ public function setName( $value){
+ return $this->_set(1, $value);
+ }
+ }
+}
+
+namespace helloworld {
+
+ class HelloReply extends \DrSlump\Protobuf\Message {
+
+ /** @var string */
+ public $message = null;
+
+
+ /** @var \Closure[] */
+ protected static $__extensions = array();
+
+ public static function descriptor()
+ {
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloReply');
+
+ // OPTIONAL STRING message = 1
+ $f = new \DrSlump\Protobuf\Field();
+ $f->number = 1;
+ $f->name = "message";
+ $f->type = \DrSlump\Protobuf::TYPE_STRING;
+ $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
+ $descriptor->addField($f);
+
+ foreach (self::$__extensions as $cb) {
+ $descriptor->addField($cb(), true);
+ }
+
+ return $descriptor;
+ }
+
+ /**
+ * Check if <message> has a value
+ *
+ * @return boolean
+ */
+ public function hasMessage(){
+ return $this->_has(1);
+ }
+
+ /**
+ * Clear <message> value
+ *
+ * @return \helloworld\HelloReply
+ */
+ public function clearMessage(){
+ return $this->_clear(1);
+ }
+
+ /**
+ * Get <message> value
+ *
+ * @return string
+ */
+ public function getMessage(){
+ return $this->_get(1);
+ }
+
+ /**
+ * Set <message> value
+ *
+ * @param string $value
+ * @return \helloworld\HelloReply
+ */
+ public function setMessage( $value){
+ return $this->_set(1, $value);
+ }
+ }
+}
+
+namespace helloworld {
+
+ class GreeterClient extends \Grpc\BaseStub {
+
+ public function __construct($hostname, $opts) {
+ parent::__construct($hostname, $opts);
+ }
+ /**
+ * @param helloworld\HelloRequest $input
+ */
+ public function SayHello(\helloworld\HelloRequest $argument, $metadata = array(), $options = array()) {
+ return $this->_simpleRequest('/helloworld.Greeter/SayHello', $argument, '\helloworld\HelloReply::deserialize', $metadata, $options);
+ }
+ }
+}
« no previous file with comments | « third_party/grpc/examples/php/greeter_client.php ('k') | third_party/grpc/examples/php/helloworld.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698