Index: third_party/protobuf/php/src/Google/Protobuf/Internal/OneofField.php |
diff --git a/third_party/protobuf/csharp/src/Google.Protobuf/FrameworkPortability.cs b/third_party/protobuf/php/src/Google/Protobuf/Internal/OneofField.php |
similarity index 70% |
copy from third_party/protobuf/csharp/src/Google.Protobuf/FrameworkPortability.cs |
copy to third_party/protobuf/php/src/Google/Protobuf/Internal/OneofField.php |
index c8060f6ca8ee3db3f0565a6fe9fbe8cfc928c9b1..2c689e836cc2ea7dc0b28b1a6e01d12ac3799773 100644 |
--- a/third_party/protobuf/csharp/src/Google.Protobuf/FrameworkPortability.cs |
+++ b/third_party/protobuf/php/src/Google/Protobuf/Internal/OneofField.php |
@@ -1,4 +1,5 @@ |
-#region Copyright notice and license |
+<?php |
+ |
// Protocol Buffers - Google's data interchange format |
// Copyright 2008 Google Inc. All rights reserved. |
// https://developers.google.com/protocol-buffers/ |
@@ -28,22 +29,49 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-#endregion |
-using System; |
-using System.Text.RegularExpressions; |
+namespace Google\Protobuf\Internal; |
-namespace Google.Protobuf |
+class OneofField |
{ |
- /// <summary> |
- /// Class containing helpful workarounds for various platform compatibility |
- /// </summary> |
- internal static class FrameworkPortability |
+ |
+ private $desc; |
+ private $field_name; |
+ private $number = 0; |
+ private $value; |
+ |
+ public function __construct($desc) |
+ { |
+ $this->desc = $desc; |
+ } |
+ |
+ public function setValue($value) |
+ { |
+ $this->value = $value; |
+ } |
+ |
+ public function getValue() |
+ { |
+ return $this->value; |
+ } |
+ |
+ public function setFieldName($field_name) |
+ { |
+ $this->field_name = $field_name; |
+ } |
+ |
+ public function getFieldName() |
+ { |
+ return $this->field_name; |
+ } |
+ |
+ public function setNumber($number) |
+ { |
+ $this->number = $number; |
+ } |
+ |
+ public function getNumber() |
{ |
- // The value of RegexOptions.Compiled is 8. We can test for the presence at |
- // execution time using Enum.IsDefined, so a single build will do the right thing |
- // on each platform. (RegexOptions.Compiled isn't supported by PCLs.) |
- internal static readonly RegexOptions CompiledRegexWhereAvailable = |
- Enum.IsDefined(typeof(RegexOptions), 8) ? (RegexOptions)8 : RegexOptions.None; |
+ return $this->number; |
} |
-} |
+} |