diff --git a/src/config.h.in b/src/config.h.in~ similarity index 100% rename from src/config.h.in rename to src/config.h.in~ diff --git a/src/php_method.cc b/src/php_method.cc index a0d9fe2..59f4115 100644 --- a/src/php_method.cc +++ b/src/php_method.cc @@ -40,6 +40,7 @@ void PHPFileGenerator::PrintSetterGetterMethods(const Descriptor& message) { printer_.Print("\n"); printer_.Print(variables, + "public function set`oneof_capitalized_name`($value, $case) { $this->`oneof_case` = $case; $this->`oneof_name` = $value; }\n" "public function clear`oneof_capitalized_name`() { $this->`oneof_case` = `oneof_default`; $this->`oneof_name` = null; }\n" "public function has`oneof_capitalized_name`()`bool_return_type` { return $this->`oneof_case` !== `oneof_default`; }\n" "public function get`oneof_capitalized_name`() { if($this->`oneof_case` !== `oneof_default`) return $this->`oneof_name`; else return null; }\n"