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\CollectionCode
public function add(mixed $element) : bool {
$this[] = $element;
return true;
}