Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RepeatedField.php

function RepeatedField::offsetGet

Return the element at the given index.

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

@todo need to add return type mixed (require update php version to 8.0)

Parameters

integer $offset The index of the element to be fetched.:

Return value

mixed The stored element at given index.

Throws

\ErrorException Invalid type for index.

\ErrorException Non-existing index.

File

vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php, line 103

Class

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

Namespace

Google\Protobuf\Internal

Code

public function offsetGet($offset) {
    return $this->container[$offset];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal