1
1
<?php
2
2
/**
3
- * Auto generated from test.proto at 2016-08-15 23:40:08
3
+ * Auto generated from test.proto at 2016-08-24 20:32:21
4
4
*/
5
5
6
6
namespace {
@@ -35,6 +35,8 @@ class Foo extends \ProtobufMessage
35
35
const SINT32_PACKED_FIELD = 23 ;
36
36
const BOOL_PACKED_FIELD = 24 ;
37
37
const OPTIONAL_EMBEDDED_FIELD = 25 ;
38
+ const REPEATED_OBJ_FIELD = 26 ;
39
+ const REPEATED_STRING_FIELD = 27 ;
38
40
39
41
/* @var array Field descriptors */
40
42
protected static $ fields = array (
@@ -170,6 +172,16 @@ class Foo extends \ProtobufMessage
170
172
'required ' => false ,
171
173
'type ' => '\Baz '
172
174
),
175
+ self ::REPEATED_OBJ_FIELD => array (
176
+ 'name ' => 'repeated_obj_field ' ,
177
+ 'repeated ' => true ,
178
+ 'type ' => '\Bar '
179
+ ),
180
+ self ::REPEATED_STRING_FIELD => array (
181
+ 'name ' => 'repeated_string_field ' ,
182
+ 'repeated ' => true ,
183
+ 'type ' => \ProtobufMessage::PB_TYPE_STRING ,
184
+ ),
173
185
);
174
186
175
187
/**
@@ -212,6 +224,8 @@ public function reset()
212
224
$ this ->values [self ::SINT32_PACKED_FIELD ] = array ();
213
225
$ this ->values [self ::BOOL_PACKED_FIELD ] = array ();
214
226
$ this ->values [self ::OPTIONAL_EMBEDDED_FIELD ] = null ;
227
+ $ this ->values [self ::REPEATED_OBJ_FIELD ] = array ();
228
+ $ this ->values [self ::REPEATED_STRING_FIELD ] = array ();
215
229
}
216
230
217
231
/**
@@ -1109,5 +1123,133 @@ public function getOptionalEmbeddedField()
1109
1123
{
1110
1124
return $ this ->get (self ::OPTIONAL_EMBEDDED_FIELD );
1111
1125
}
1126
+
1127
+ /**
1128
+ * Appends value to 'repeated_obj_field' list
1129
+ *
1130
+ * @param \Bar $value Value to append
1131
+ *
1132
+ * @return null
1133
+ */
1134
+ public function appendRepeatedObjField (\Bar $ value )
1135
+ {
1136
+ return $ this ->append (self ::REPEATED_OBJ_FIELD , $ value );
1137
+ }
1138
+
1139
+ /**
1140
+ * Clears 'repeated_obj_field' list
1141
+ *
1142
+ * @return null
1143
+ */
1144
+ public function clearRepeatedObjField ()
1145
+ {
1146
+ return $ this ->clear (self ::REPEATED_OBJ_FIELD );
1147
+ }
1148
+
1149
+ /**
1150
+ * Returns 'repeated_obj_field' list
1151
+ *
1152
+ * @return \Bar[]
1153
+ */
1154
+ public function getRepeatedObjField ()
1155
+ {
1156
+ return $ this ->get (self ::REPEATED_OBJ_FIELD );
1157
+ }
1158
+
1159
+ /**
1160
+ * Returns 'repeated_obj_field' iterator
1161
+ *
1162
+ * @return \ArrayIterator
1163
+ */
1164
+ public function getRepeatedObjFieldIterator ()
1165
+ {
1166
+ return new \ArrayIterator ($ this ->get (self ::REPEATED_OBJ_FIELD ));
1167
+ }
1168
+
1169
+ /**
1170
+ * Returns element from 'repeated_obj_field' list at given offset
1171
+ *
1172
+ * @param int $offset Position in list
1173
+ *
1174
+ * @return \Bar
1175
+ */
1176
+ public function getRepeatedObjFieldAt ($ offset )
1177
+ {
1178
+ return $ this ->get (self ::REPEATED_OBJ_FIELD , $ offset );
1179
+ }
1180
+
1181
+ /**
1182
+ * Returns count of 'repeated_obj_field' list
1183
+ *
1184
+ * @return int
1185
+ */
1186
+ public function getRepeatedObjFieldCount ()
1187
+ {
1188
+ return $ this ->count (self ::REPEATED_OBJ_FIELD );
1189
+ }
1190
+
1191
+ /**
1192
+ * Appends value to 'repeated_string_field' list
1193
+ *
1194
+ * @param string $value Value to append
1195
+ *
1196
+ * @return null
1197
+ */
1198
+ public function appendRepeatedStringField ($ value )
1199
+ {
1200
+ return $ this ->append (self ::REPEATED_STRING_FIELD , $ value );
1201
+ }
1202
+
1203
+ /**
1204
+ * Clears 'repeated_string_field' list
1205
+ *
1206
+ * @return null
1207
+ */
1208
+ public function clearRepeatedStringField ()
1209
+ {
1210
+ return $ this ->clear (self ::REPEATED_STRING_FIELD );
1211
+ }
1212
+
1213
+ /**
1214
+ * Returns 'repeated_string_field' list
1215
+ *
1216
+ * @return string[]
1217
+ */
1218
+ public function getRepeatedStringField ()
1219
+ {
1220
+ return $ this ->get (self ::REPEATED_STRING_FIELD );
1221
+ }
1222
+
1223
+ /**
1224
+ * Returns 'repeated_string_field' iterator
1225
+ *
1226
+ * @return \ArrayIterator
1227
+ */
1228
+ public function getRepeatedStringFieldIterator ()
1229
+ {
1230
+ return new \ArrayIterator ($ this ->get (self ::REPEATED_STRING_FIELD ));
1231
+ }
1232
+
1233
+ /**
1234
+ * Returns element from 'repeated_string_field' list at given offset
1235
+ *
1236
+ * @param int $offset Position in list
1237
+ *
1238
+ * @return string
1239
+ */
1240
+ public function getRepeatedStringFieldAt ($ offset )
1241
+ {
1242
+ return $ this ->get (self ::REPEATED_STRING_FIELD , $ offset );
1243
+ }
1244
+
1245
+ /**
1246
+ * Returns count of 'repeated_string_field' list
1247
+ *
1248
+ * @return int
1249
+ */
1250
+ public function getRepeatedStringFieldCount ()
1251
+ {
1252
+ return $ this ->count (self ::REPEATED_STRING_FIELD );
1253
+ }
1112
1254
}
1113
1255
}
0 commit comments