diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-11-30 12:19:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 12:19:50 -0800 |
commit | 74e7decbbf130485a5bc5d792fb4f9285143bce3 (patch) | |
tree | 69cfe486e2d69ecaf340b184f0b75651cfe57b43 /php/src/Google/Protobuf/Internal | |
parent | cf65a7946fb42e941708d10adbce69924c6d1ee0 (diff) |
Provide discardUnknonwnFields API in php (#3976)
* Provide discardUnknownFields API in php implementation
* Provide discardUnknownFields API in php c extension.
Diffstat (limited to 'php/src/Google/Protobuf/Internal')
-rw-r--r-- | php/src/Google/Protobuf/Internal/Message.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php index a7a4f272..26d20575 100644 --- a/php/src/Google/Protobuf/Internal/Message.php +++ b/php/src/Google/Protobuf/Internal/Message.php @@ -577,6 +577,15 @@ class Message } /** + * Clear all unknown fields previously parsed. + * @return null. + */ + public function discardUnknownFields() + { + $this->unknown = ""; + } + + /** * Merges the contents of the specified message into current message. * * This method merges the contents of the specified message into the |