1<?php 2 3// Protocol Buffers - Google's data interchange format 4// Copyright 2008 Google Inc. All rights reserved. 5// 6// Use of this source code is governed by a BSD-style 7// license that can be found in the LICENSE file or at 8// https://developers.google.com/open-source/licenses/bsd 9 10namespace Google\Protobuf\Internal; 11 12class OneofField 13{ 14 15 private $desc; 16 private $field_name; 17 private $number = 0; 18 private $value; 19 20 public function __construct($desc) 21 { 22 $this->desc = $desc; 23 } 24 25 public function setValue($value) 26 { 27 $this->value = $value; 28 } 29 30 public function getValue() 31 { 32 return $this->value; 33 } 34 35 public function setFieldName($field_name) 36 { 37 $this->field_name = $field_name; 38 } 39 40 public function getFieldName() 41 { 42 return $this->field_name; 43 } 44 45 public function setNumber($number) 46 { 47 $this->number = $number; 48 } 49 50 public function getNumber() 51 { 52 return $this->number; 53 } 54} 55