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

CloneableInstantiableIterable
ImplementsArrayAccess
Countable
IteratorAggregate
Traversable
Methods
public __construct( $key_type, $value_type, $klass = NULL)
 

Constructs an instance of MapField.

  • 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 getIterator()
 
  • ignore
public getKeyType()
 
  • ignore
public getLegacyValueClass()
 
  • ignore
public getValueClass()
 
  • ignore
public getValueType()
 
  • ignore
public offsetExists( $key)
 

Check the existence of the element at the given key.

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

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

Return the element at the given key.

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

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

Assign the element at the given key.

This will also be called for: $arr[$key] = $value

  • return void
  • throws ErrorException Invalid type for key.
  • throws ErrorException Invalid type for value.
  • throws ErrorException Non-existing key.
public offsetUnset( $key)
 

Remove the element at the given key.

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

  • return void
  • throws ErrorException Invalid type for key.
Properties
private $container
 
  • ignore
private $key_type
 
  • ignore
private $klass
 
  • ignore
private $legacy_klass
 
  • ignore
private $value_type
 
  • ignore
Methods
private checkKey( $key_type, $key)
 
  • ignore
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only