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

Breadcrumb

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

function AbstractSet::offsetSet

Overrides AbstractCollection::offsetSet

File

vendor/ramsey/collection/src/AbstractSet.php, line 36

Class

AbstractSet
This class contains the basic implementation of a collection that does not allow duplicated values (a set), to minimize the effort required to implement this specific type of collection.

Namespace

Ramsey\Collection

Code

public function offsetSet(mixed $offset, mixed $value) : void {
    if ($this->contains($value)) {
        return;
    }
    parent::offsetSet($offset, $value);
}
RSS feed
Powered by Drupal