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

Breadcrumb

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

function MapInterface::put

Associates the specified value with the specified key in this map.

If the map previously contained a mapping for the key, the old value is replaced by the specified value.

Parameters

K $key The key to put or replace in the map.:

T $value The value to store at `$key`.:

Return value

T | null the previous value associated with key, or `null` if there was no mapping for `$key`.

1 method overrides MapInterface::put()
AbstractMap::put in vendor/ramsey/collection/src/Map/AbstractMap.php

File

vendor/ramsey/collection/src/Map/MapInterface.php, line 77

Class

MapInterface
An object that maps keys to values.

Namespace

Ramsey\Collection\Map

Code

public function put(int|string $key, mixed $value) : mixed;

API Navigation

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