File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,45 @@ public function isSuperset(EnumSet $other)
240
240
return ($ thisBitset | $ other ->getBinaryBitsetLe ()) === $ thisBitset ;
241
241
}
242
242
243
+ /**
244
+ * Get values of the defined enumerators as array
245
+ * @return null[]|bool[]|int[]|float[]|string[]
246
+ */
247
+ public function getValues ()
248
+ {
249
+ $ values = array ();
250
+ foreach ($ this as $ enumerator ) {
251
+ $ values [] = $ enumerator ->getValue ();
252
+ }
253
+ return $ values ;
254
+ }
255
+
256
+ /**
257
+ * Get names of the defined enumerators as array
258
+ * @return string[]
259
+ */
260
+ public function getNames ()
261
+ {
262
+ $ names = array ();
263
+ foreach ($ this as $ enumerator ) {
264
+ $ names [] = $ enumerator ->getName ();
265
+ }
266
+ return $ names ;
267
+ }
268
+
269
+ /**
270
+ * Get the defined enumerators as array
271
+ * @return Enum[]
272
+ */
273
+ public function getEnumerators ()
274
+ {
275
+ $ enumerators = array ();
276
+ foreach ($ this as $ enumerator ) {
277
+ $ enumerators [] = $ enumerator ->getName ();
278
+ }
279
+ return $ enumerators ;
280
+ }
281
+
243
282
/**
244
283
* Get binary bitset in little-endian order
245
284
*
You can’t perform that action at this time.
0 commit comments