function TemporaryArrayObjectThrowingExceptions::offsetGet

Same name in other branches
  1. 9 core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php \Drupal\jsonapi\Normalizer\Value\TemporaryArrayObjectThrowingExceptions::offsetGet()
  2. 10 core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php \Drupal\jsonapi\Normalizer\Value\TemporaryArrayObjectThrowingExceptions::offsetGet()

Returns the value at the specified index.

Parameters

mixed $key: The index with the value.

Return value

mixed The value at the specified index or null.

Throws

\Exception This class does not support this action but it must implement it, because it is extending \ArrayObject.

File

core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php, line 173

Class

TemporaryArrayObjectThrowingExceptions
An \ArrayObject that throws an exception when used as an ArrayObject.

Namespace

Drupal\jsonapi\Normalizer\Value

Code

public function offsetGet($key) : mixed {
    throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.