function DoubleEndedQueueInterface::offerLast
Inserts the specified element at the end of this queue if it is possible to do so immediately without violating capacity restrictions.
When using a capacity-restricted queue, this method is generally preferable to `addLast()` which can fail to insert an element only by throwing an exception.
Parameters
T $element The element to add to the end of this queue.:
Return value
bool `true` if the element was added to this queue, else `false`.
1 method overrides DoubleEndedQueueInterface::offerLast()
- DoubleEndedQueue::offerLast in vendor/
ramsey/ collection/ src/ DoubleEndedQueue.php - Inserts the specified element at the end of this queue if it is possible to do so immediately without violating capacity restrictions.
File
-
vendor/
ramsey/ collection/ src/ DoubleEndedQueueInterface.php, line 232
Class
- DoubleEndedQueueInterface
- A linear collection that supports element insertion and removal at both ends.
Namespace
Ramsey\CollectionCode
public function offerLast(mixed $element) : bool;