aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src
diff options
context:
space:
mode:
authorGravatar Matt A <matthew.james.allan@gmail.com>2017-07-18 10:45:18 -0400
committerGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-07-18 07:45:18 -0700
commit9e745f771b2a0cde271b8283753c19014124ac95 (patch)
treefdbeb728029877de7d65f4b8d467e6b7970741db /php/src
parent33545583286a31940b6a732b1888e639cdf2e3c4 (diff)
Support PHP generic services (#3269)
* Add php_generic_services option * Generate PHP generic services * Respect namespaces for generated PHP services * Test PHP generated services * Rename PHP generator service method doc comment function * Correct phpdoc service method case * Test namespaced PHP generic services * Always use the FQCN for PHP generic service input/output * Add generated_service_test to php test.sh * Add php service test protos to CI * Add php service files to php_EXTRA_DIST * Use Interface suffix for php generic services
Diffstat (limited to 'php/src')
-rw-r--r--php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php1
-rw-r--r--php/src/Google/Protobuf/Internal/FileOptions.php33
2 files changed, 34 insertions, 0 deletions
diff --git a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
index 636a0ad4..1e3c745e 100644
--- a/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
+++ b/php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -139,6 +139,7 @@ class Descriptor
->optional('cc_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 16)
->optional('java_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 17)
->optional('py_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 18)
+ ->optional('php_generic_services', \Google\Protobuf\Internal\GPBType::BOOL, 19)
->optional('deprecated', \Google\Protobuf\Internal\GPBType::BOOL, 23)
->optional('cc_enable_arenas', \Google\Protobuf\Internal\GPBType::BOOL, 31)
->optional('objc_class_prefix', \Google\Protobuf\Internal\GPBType::STRING, 36)
diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php
index 200ee9de..c7972ca7 100644
--- a/php/src/Google/Protobuf/Internal/FileOptions.php
+++ b/php/src/Google/Protobuf/Internal/FileOptions.php
@@ -110,6 +110,11 @@ class FileOptions extends \Google\Protobuf\Internal\Message
private $py_generic_services = false;
private $has_py_generic_services = false;
/**
+ * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code>
+ */
+ private $php_generic_services = false;
+ private $has_php_generic_services = false;
+ /**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very
@@ -549,6 +554,34 @@ class FileOptions extends \Google\Protobuf\Internal\Message
}
/**
+ * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code>
+ * @return bool
+ */
+ public function getPhpGenericServices()
+ {
+ return $this->php_generic_services;
+ }
+
+ /**
+ * Generated from protobuf field <code>optional bool php_generic_services = 19 [default = false];</code>
+ * @param bool $var
+ * @return $this
+ */
+ public function setPhpGenericServices($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->php_generic_services = $var;
+ $this->has_php_generic_services = true;
+
+ return $this;
+ }
+
+ public function hasPhpGenericServices()
+ {
+ return $this->has_php_generic_services;
+ }
+
+ /**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very