RepeatedField is used by generated protocol message classes to manipulate repeated fields. It can be used like native PHP array.

CloneableInstantiableIterable
ImplementsArrayAccess
Countable
IteratorAggregate
Traversable
Methods
public __construct( $type, $klass = NULL)
 
Constructs an instance of RepeatedField.

  • ignore
public count()
 
Return the number of stored elements.

This will also be called for: count($arr)

  • return int The number of stored elements.
public getClass()
 


  • ignore
public getIterator()
 


  • ignore
public getLegacyClass()
 


  • ignore
public getType()
 


  • ignore
public offsetExists( $offset)
 
Check the existence of the element at the given index.

This will also be called for: isset($arr)

  • return bool True if the element at the given offset exists.
  • throws ErrorException Invalid type for index.
public offsetGet( $offset)
 
Return the element at the given index.

This will also be called for: $ele = $arr[0]

  • return object The stored element at given index.
  • throws ErrorException Invalid type for index.
  • throws ErrorException Non-existing index.
public offsetSet( $offset, $value)
 
Assign the element at the given index.

This will also be called for: $arr []= $ele and $arr[0] = ele

  • return void
  • throws ErrorException Invalid type for index.
  • throws ErrorException Non-existing index.
  • throws ErrorException Incorrect type of the element.
public offsetUnset( $offset)
 
Remove the element at the given index.

This will also be called for: unset($arr)

  • return void
  • throws ErrorException Invalid type for index.
  • throws ErrorException The element to be removed is not at the end of the RepeatedField.
Properties
private $container
 


  • ignore
private $klass
 


  • ignore
private $legacy_klass
 


  • ignore
private $type
 


  • ignore
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only