aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/php
diff options
context:
space:
mode:
authorBrent Shaffer <betterbrent@google.com>2017-05-29 10:39:14 -0700
committerPaul Yang <TeBoring@users.noreply.github.com>2017-05-29 10:39:14 -0700
commit4d5daf4ef97918176b892dbedce17b1d854ffe8e (patch)
tree878663f363714f9f7b1e7ab3f2ea74d1d0a1321c /src/google/protobuf/compiler/php
parent4674cc7c073f1b8d5efd2a42ffcf3ca30a907bfe (diff)
downloadprotobuf-4d5daf4ef97918176b892dbedce17b1d854ffe8e.tar.gz
protobuf-4d5daf4ef97918176b892dbedce17b1d854ffe8e.tar.bz2
protobuf-4d5daf4ef97918176b892dbedce17b1d854ffe8e.zip
Adds fluent setters for PHP (#3130)
Diffstat (limited to 'src/google/protobuf/compiler/php')
-rw-r--r--src/google/protobuf/compiler/php/php_generator.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc
index ea850c0f..54fafc40 100644
--- a/src/google/protobuf/compiler/php/php_generator.cc
+++ b/src/google/protobuf/compiler/php/php_generator.cc
@@ -530,6 +530,8 @@ void GenerateFieldAccessor(const FieldDescriptor* field, bool is_descriptor,
"field_name", field->name());
}
+ printer->Print("\nreturn $this;\n");
+
Outdent(printer);
printer->Print(