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

Breadcrumb

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

function AbstractMap::offsetSet

@inheritDoc @psalm-suppress MoreSpecificImplementedParamType,DocblockTypeContradiction

Parameters

K $offset The offset to set:

T $value The value to set at the given offset.:

Overrides AbstractArray::offsetSet

2 calls to AbstractMap::offsetSet()
AbstractTypedMap::offsetSet in vendor/ramsey/collection/src/Map/AbstractTypedMap.php
@inheritDoc @psalm-suppress MoreSpecificImplementedParamType
AbstractTypedMap::offsetSet in vendor/ramsey/collection/src/Map/AbstractTypedMap.php
@inheritDoc @psalm-suppress MoreSpecificImplementedParamType
2 methods override AbstractMap::offsetSet()
AbstractTypedMap::offsetSet in vendor/ramsey/collection/src/Map/AbstractTypedMap.php
@inheritDoc @psalm-suppress MoreSpecificImplementedParamType
NamedParameterMap::offsetSet in vendor/ramsey/collection/src/Map/NamedParameterMap.php
@inheritDoc @psalm-suppress MoreSpecificImplementedParamType,DocblockTypeContradiction

File

vendor/ramsey/collection/src/Map/AbstractMap.php, line 60

Class

AbstractMap
This class provides a basic implementation of `MapInterface`, to minimize the effort required to implement this interface.

Namespace

Ramsey\Collection\Map

Code

public function offsetSet(mixed $offset, mixed $value) : void {
    if ($offset === null) {
        throw new InvalidArgumentException('Map elements are key/value pairs; a key must be provided for ' . 'value ' . var_export($value, true));
    }
    $this->data[$offset] = $value;
}

API Navigation

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