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

Breadcrumb

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

function Queue::add

Throws

InvalidArgumentException if $value is of the wrong type.

Overrides QueueInterface::add

2 calls to Queue::add()
DoubleEndedQueue::addLast in vendor/ramsey/collection/src/DoubleEndedQueue.php
Queue::offer in vendor/ramsey/collection/src/Queue.php
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.

File

vendor/ramsey/collection/src/Queue.php, line 73

Class

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

Namespace

Ramsey\Collection

Code

public function add(mixed $element) : bool {
    $this[] = $element;
    return true;
}
RSS feed
Powered by Drupal