RepeatedField
class RepeatedField implements ArrayAccess, IteratorAggregate, Countable (View source)
RepeatedField is used by generated protocol message classes to manipulate repeated fields. It can be used like native PHP array.
Methods
Constructs an instance of RepeatedField.
No description
No description
No description
Return the element at the given index.
Assign the element at the given index.
Remove the element at the given index.
Check the existence of the element at the given index.
No description
Return the number of stored elements.
Details
__construct(int $type, string $klass = null)
Constructs an instance of RepeatedField.
getType()
No description
getClass()
No description
getLegacyClass()
No description
mixed
offsetGet(int $offset)
Return the element at the given index.
This will also be called for: $ele = $arr[0]
void
offsetSet(int|null $offset, mixed $value)
Assign the element at the given index.
This will also be called for: $arr []= $ele and $arr[0] = ele
void
offsetUnset(int $offset)
Remove the element at the given index.
This will also be called for: unset($arr)
bool
offsetExists(int $offset)
Check the existence of the element at the given index.
This will also be called for: isset($arr)
Traversable
getIterator()
No description
int
count()
Return the number of stored elements.
This will also be called for: count($arr)