--- a/lib/Protobuf-PHP/tests/protos/simple.php +++ b/lib/Protobuf-PHP/tests/protos/simple.php @@ -1,1 +1,789 @@ - +number = 1; + $f->name = "double"; + $f->type = 1; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:double) + $descriptor->addField($f); + + // optional float = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "float"; + $f->type = 2; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:float) + $descriptor->addField($f); + + // optional int64 = 3 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 3; + $f->name = "int64"; + $f->type = 3; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:int64) + $descriptor->addField($f); + + // optional uint64 = 4 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 4; + $f->name = "uint64"; + $f->type = 4; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:uint64) + $descriptor->addField($f); + + // optional int32 = 5 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 5; + $f->name = "int32"; + $f->type = 5; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:int32) + $descriptor->addField($f); + + // optional fixed64 = 6 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 6; + $f->name = "fixed64"; + $f->type = 6; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:fixed64) + $descriptor->addField($f); + + // optional fixed32 = 7 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 7; + $f->name = "fixed32"; + $f->type = 7; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:fixed32) + $descriptor->addField($f); + + // optional bool = 8 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 8; + $f->name = "bool"; + $f->type = 8; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:bool) + $descriptor->addField($f); + + // optional string = 9 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 9; + $f->name = "string"; + $f->type = 9; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:string) + $descriptor->addField($f); + + // optional bytes = 12 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 12; + $f->name = "bytes"; + $f->type = 12; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:bytes) + $descriptor->addField($f); + + // optional uint32 = 13 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 13; + $f->name = "uint32"; + $f->type = 13; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:uint32) + $descriptor->addField($f); + + // optional sfixed32 = 15 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 15; + $f->name = "sfixed32"; + $f->type = 15; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:sfixed32) + $descriptor->addField($f); + + // optional sfixed64 = 16 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 16; + $f->name = "sfixed64"; + $f->type = 16; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:sfixed64) + $descriptor->addField($f); + + // optional sint32 = 17 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 17; + $f->name = "sint32"; + $f->type = 17; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:sint32) + $descriptor->addField($f); + + // optional sint64 = 18 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 18; + $f->name = "sint64"; + $f->type = 18; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_tests.Simple:sint64) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_tests.Simple) + + return $descriptor; + } + + /** @var float */ + public $double = null; + + /** @var float */ + public $float = null; + + /** @var int */ + public $int64 = null; + + /** @var int */ + public $uint64 = null; + + /** @var int */ + public $int32 = null; + + /** @var int */ + public $fixed64 = null; + + /** @var int */ + public $fixed32 = null; + + /** @var boolean */ + public $bool = null; + + /** @var string */ + public $string = null; + + /** @var string */ + public $bytes = null; + + /** @var int */ + public $uint32 = null; + + /** @var int */ + public $sfixed32 = null; + + /** @var int */ + public $sfixed64 = null; + + /** @var int */ + public $sint32 = null; + + /** @var int */ + public $sint64 = null; + + + /** + * Check if has a value + * + * @return boolean + */ + public function hasDouble(){ + return $this->_has(1); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearDouble(){ + return $this->_clear(1); + } + + /** + * Get value + * + * @return float + */ + public function getDouble(){ + return $this->_get(1); + } + + /** + * Set value + * + * @param float $value + * @return \tests\Simple + */ + public function setDouble( $value){ + return $this->_set(1, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasFloat(){ + return $this->_has(2); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearFloat(){ + return $this->_clear(2); + } + + /** + * Get value + * + * @return float + */ + public function getFloat(){ + return $this->_get(2); + } + + /** + * Set value + * + * @param float $value + * @return \tests\Simple + */ + public function setFloat( $value){ + return $this->_set(2, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasInt64(){ + return $this->_has(3); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearInt64(){ + return $this->_clear(3); + } + + /** + * Get value + * + * @return int + */ + public function getInt64(){ + return $this->_get(3); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setInt64( $value){ + return $this->_set(3, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasUint64(){ + return $this->_has(4); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearUint64(){ + return $this->_clear(4); + } + + /** + * Get value + * + * @return int + */ + public function getUint64(){ + return $this->_get(4); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setUint64( $value){ + return $this->_set(4, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasInt32(){ + return $this->_has(5); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearInt32(){ + return $this->_clear(5); + } + + /** + * Get value + * + * @return int + */ + public function getInt32(){ + return $this->_get(5); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setInt32( $value){ + return $this->_set(5, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasFixed64(){ + return $this->_has(6); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearFixed64(){ + return $this->_clear(6); + } + + /** + * Get value + * + * @return int + */ + public function getFixed64(){ + return $this->_get(6); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setFixed64( $value){ + return $this->_set(6, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasFixed32(){ + return $this->_has(7); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearFixed32(){ + return $this->_clear(7); + } + + /** + * Get value + * + * @return int + */ + public function getFixed32(){ + return $this->_get(7); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setFixed32( $value){ + return $this->_set(7, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasBool(){ + return $this->_has(8); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearBool(){ + return $this->_clear(8); + } + + /** + * Get value + * + * @return boolean + */ + public function getBool(){ + return $this->_get(8); + } + + /** + * Set value + * + * @param boolean $value + * @return \tests\Simple + */ + public function setBool( $value){ + return $this->_set(8, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasString(){ + return $this->_has(9); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearString(){ + return $this->_clear(9); + } + + /** + * Get value + * + * @return string + */ + public function getString(){ + return $this->_get(9); + } + + /** + * Set value + * + * @param string $value + * @return \tests\Simple + */ + public function setString( $value){ + return $this->_set(9, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasBytes(){ + return $this->_has(12); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearBytes(){ + return $this->_clear(12); + } + + /** + * Get value + * + * @return string + */ + public function getBytes(){ + return $this->_get(12); + } + + /** + * Set value + * + * @param string $value + * @return \tests\Simple + */ + public function setBytes( $value){ + return $this->_set(12, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasUint32(){ + return $this->_has(13); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearUint32(){ + return $this->_clear(13); + } + + /** + * Get value + * + * @return int + */ + public function getUint32(){ + return $this->_get(13); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setUint32( $value){ + return $this->_set(13, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasSfixed32(){ + return $this->_has(15); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearSfixed32(){ + return $this->_clear(15); + } + + /** + * Get value + * + * @return int + */ + public function getSfixed32(){ + return $this->_get(15); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setSfixed32( $value){ + return $this->_set(15, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasSfixed64(){ + return $this->_has(16); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearSfixed64(){ + return $this->_clear(16); + } + + /** + * Get value + * + * @return int + */ + public function getSfixed64(){ + return $this->_get(16); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setSfixed64( $value){ + return $this->_set(16, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasSint32(){ + return $this->_has(17); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearSint32(){ + return $this->_clear(17); + } + + /** + * Get value + * + * @return int + */ + public function getSint32(){ + return $this->_get(17); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setSint32( $value){ + return $this->_set(17, $value); + } + + /** + * Check if has a value + * + * @return boolean + */ + public function hasSint64(){ + return $this->_has(18); + } + + /** + * Clear value + * + * @return \tests\Simple + */ + public function clearSint64(){ + return $this->_clear(18); + } + + /** + * Get value + * + * @return int + */ + public function getSint64(){ + return $this->_get(18); + } + + /** + * Set value + * + * @param int $value + * @return \tests\Simple + */ + public function setSint64( $value){ + return $this->_set(18, $value); + } + + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_tests.Simple) + } +} + +