function MapField::offsetGet
Return the element at the given key.
This will also be called for: $ele = $arr[$key]
@todo need to add return type mixed (require update php version to 8.0)
Parameters
int|string $key The key of the element to be fetched.:
Return value
object The stored element at given key.
Throws
\ErrorException Invalid type for index.
\ErrorException Non-existing index.
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ MapField.php, line 117
Class
- MapField
- MapField is used by generated protocol message classes to manipulate map fields. It can be used like native PHP array.
Namespace
Google\Protobuf\InternalCode
public function offsetGet($key) {
return $this->container[$key];
}