this methods adds an item to the queue to the last index

@param $item
@return bool
438035
public function enqueue($item): bool {
        if (!$this->isValid()) return false;

        $this->queue[$this->head] = $item;
        $this->head++;
        return true;
    }
998388
public function add($item)
    {
        // Disallow items outside of original boundaries
        if (!in_array($item, $this->originalList)) {
            return;
        }
        if (!in_array($item, $this->currentList)) {
            $this->currentList[] = $item;
        }
    }
919194
public function checkItemIsActive($item)
    {
        if ($this->getActive()) {
            return true;
        }

        if (empty($item_list = $item->getHideIfItemNotActiveOption())) {
            return true;
        }

        if (!is_array($item_list)) {
            $item_list = [$item_list];
        }

        foreach ($item_list as $nickname) {
            $check_item = $item->getMenu()->get($nickname);

            if (!is_null($check_item) && $check_item->getActive()) {
                return true;
            }
        }

        return false;
    }
1280900
public function dequeue(&$item) : Queue
    {
        $values = $this->_shift($item);
        $this->setValues($values);
        return $this;
    }
1324341
public function lastIndexOf($collection=null, $item=null) {
    list($collection, $item) = self::_wrapArgs(func_get_args(), 2);
    
    $collection = self::_collection($collection);
    
    krsort($collection);
    $__ = new self;
    return self::_wrap($__->indexOf($collection, $item));
  }
884669
public function add(BreadcrumbItem $item)
    {
        $this->collection[$this->count] = $item;

        $this->count++;

        return $this;
    }
589315
public function add($item)
    {
        if (is_object($item)) {
            $item = (array) $item;
        }

        $this->validate($item);
        $this->addItem($item);

        return true;
    }
56067
public function addItem(Item $item)
    {
        // set currency, so amounts transformations can be done
        $item->setCurrency($this->currency);

        array_push($this->items, $item);
        return $this;
    }
629116
public function addItem(CNabuDataObject $item)
    {
        if (is_array($nodes = $this->extractNodes($item)) && count($nodes) > 0) {
            if ($this->index === null) {
                $this->index = $nodes;
            } else {
                $this->index = array_merge($this->index, $nodes);
            }
        }
    }
1038729
public function remove( $item )
	{
		$index	= $this->getIndex( $item );
		unset( $this->list[$index] );
		return $this->write();
	}
79726
public function addToIndex(int $index, $item): bool {
        if (\count($this->array) === $this->size()) {
            $this->ensureCapacity($this->size() * 2 + 1);
        }
        $this->array[$index] = $item;
        $this->size++;
        return true;
    }
1039853
public function removeItem($item) {
    if (is_int($item)) {
      $index = $item;
      if ($index < 0) {
        throw new \OutOfBoundsException('index out of bounds');
      }
      $items = $this->getItems();
      if ($index >= count($items)) {
        throw new \OutOfBoundsException('index out of bounds');
      }
      $item = $items[$index];
      $is_last = $index === count($items) - 1;
    }
    else {
      if ($item->parent() !== $this) {
        throw new \InvalidArgumentException('invalid item');
      }
      $items = $this->getItems();
      $last_index = count($items) - 1;
      $last_item = $items[$last_index];
      $is_last = $last_item === $item;
    }
    if (count($items) === 1) {
      // No separators to remove.
    }
    elseif ($is_last) {
      $item->previousUntil(function ($node) {
        if ($node instanceof HiddenNode) {
          return FALSE;
        }
        if ($node instanceof TokenNode && $node->getType() === ',') {
          return FALSE;
        }
        return TRUE;
      })->remove();
    }
    else {
      $item->nextUntil(function ($node) {
        if ($node instanceof HiddenNode) {
          return FALSE;
        }
        if ($node instanceof TokenNode && $node->getType() === ',') {
          return FALSE;
        }
        return TRUE;
      })->remove();
    }
    $item->remove();
    return $this;
  }
719430
public function push($item)
	{
		$full_class_name = $this->getFullClassName();

		if (is_array($item)) {
			array_push($this->items, new $full_class_name($item));
		}
		elseif ($item instanceof $full_class_name) {
			array_push($this->items, $item);
		}
	}
1137098
public function push($queue, $item)
    {
        // Add the queue to the list of queues
        $this->getClient()->sadd($this->getKey(self::QUEUES_KEY), $queue);

        // Add the job to the specified queue
        $this->getClient()->rpush($this->getKey(self::QUEUE_KEY . $queue), json_encode($item));
    }
918900
public function addRow($item)
    {
        if (is_array($item)) {
            $item = array_merge($this->baseRow, ['class' => $this->rowClass, 'cells' => $item]);
            $item = Yii::createObject($item);
        }
        $this->_rows[] = $item;
        $this->_currentRow = null;

        return $item;
    }
1069133
public function addItem($item)
    {
        if (!isset($this->_items)) {
            $this->_items = [];
        }
        if (!is_array($item)) {
            $item = [];
        }
        if (!isset($item['class'])) {
            $item['class'] = $this->itemClass;
        }
        $item = Yii::createObject($item);
        $this->_items[$item->id] = $item;

        return $item;
    }
1196562
private function addItem(Item $item)
    {
        $em = $this->getDoctrine()->getManager();
        $em->persist($item);
        $em->flush();

        return $this->redirect($this->generateUrl(
            'item_show',
            ['id' => $item->getId(), 'name' => $item->getUrlName()]
        ));
    }