Get a cart item from the cart by its rowId.

@param string $rowId
@return \Gloudemans\Shoppingcart\CartItem
183446
public function get($rowId)
    {
        $content = $this->getContent();

        if ( ! $content->has($rowId))
            throw new InvalidRowIDException("The cart does not contain rowId {$rowId}.");

        return $content->get($rowId);
    }
732998
public function getById(string $cartId): Checkout
    {
        $qb = $this->connection->createQueryBuilder();
        $qb->select(
            'id', 'billing_address_name', 'billing_address_street', 'billing_address_post_code', 'billing_address_city',
            'billing_address_country_iso2code', 'shipping_address_name', 'shipping_address_street',
            'shipping_address_post_code', 'shipping_address_city', 'shipping_address_country_iso2code'
        )
            ->from('dumplie_customer_checkout')
            ->where('id = :id')
            ->setParameter('id', $cartId);

        $checkoutData = $this->connection->fetchAssoc($qb->getSQL(), $qb->getParameters());

        if (empty($checkoutData)) {
            throw QueryException::cartNotFound($cartId);
        }

        return new Checkout(
            new CartId($cartId),
            new Address(
                $checkoutData['billing_address_name'],
                $checkoutData['billing_address_street'],
                $checkoutData['billing_address_post_code'],
                $checkoutData['billing_address_city'],
                $checkoutData['billing_address_country_iso2code']
            ),
            new Address(
                $checkoutData['shipping_address_name'],
                $checkoutData['shipping_address_street'],
                $checkoutData['shipping_address_post_code'],
                $checkoutData['shipping_address_city'],
                $checkoutData['shipping_address_country_iso2code']
            )
        );
    }
470990
public function remove($rowId)
        {
            if(!$this->hasRowId($rowId)) {
                throw new Exception('This cart does not contain this row.');
            }

            $cart = $this->getContent();

            $cart->forget($rowId);

            return $this->updateCart($cart);
        }
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
220780
public function getItem(string $cacheId)
    {
        if (!$this->cache->has($cacheId)) {
            return null;
        }

        $data = $this->cache->get($cacheId);

        if (!is_array($data) || !array_key_exists('content', $data)) {
            return null;
        }

        return unserialize($data['content']);
    }
777374
public function getItem($id)
    {
        foreach ($this->entity->getItems() as $item) {
            if ($item->getId() === $id) {
                return $item;
            }
        }

        return null;
    }
125338
public function getByUserId( $userId ) {

		$modelClass	= self::$modelClass;

		$cart = $modelClass::findByParentIdParentType( $userId, CoreGlobal::TYPE_USER );

		if( !isset( $cart ) ) {

			$cart = $this->createByUserId( $userId );
		}

		return $cart;
	}
1243135
public function get($transactionId)
    {
        if ($transactionId <= 0) {
            throw new HpsArgumentException('Invalid Transaction Id',HpsExceptionCodes::INVALID_ORIGINAL_TRANSACTION);
        }

        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsReportTxnDetail = $xml->createElement('hps:ReportTxnDetail');
        $hpsReportTxnDetail->appendChild($xml->createElement('hps:TxnId', $transactionId));
        $hpsTransaction->appendChild($hpsReportTxnDetail);

        return $this->_submitTransaction($hpsTransaction, 'ReportTxnDetail');
    }
1187973
private static function createItemFromRow(array $row)
    {
        $type = intval($row['type']);
        $item = new AmazonReferenceId(
            $type,
            $row['local_id'],
            floatval($row['value']),
            ('' !== $row['pkg_shop_payment_transaction_id']) ? $row['pkg_shop_payment_transaction_id'] : null
        );
        if ('' !== $row['amazon_id']) {
            $item->setAmazonId($row['amazon_id']);
        }
        if (isset($row['capture_now']) && '1' === $row['capture_now']) {
            $item->setCaptureNow(true);
        } else {
            $item->setCaptureNow(false);
        }
        if (isset($row['request_mode']) && '' !== $row['request_mode']) {
            $item->setRequestMode(intval($row['request_mode']));
        }

        return $item;
    }
1226735
public function getItem($id)
	{
		return array_key_exists($id, $this->ids) ? $this->ids[$id] : null;
	}
164456
public function getItemById(string $itemId, bool $getChildren = false):array
    {
        $parameters = $getChildren === true ? '$expand=Children' : '';

        return $this->get("Items({$itemId})?{$parameters}");
    }
495355
public function get_item($itemid) {
        global $DB;

        $item = $DB->get_record('tool_recyclebin_category', array(
            'id' => $itemid
        ), '*', MUST_EXIST);

        $item->name = get_course_display_name_for_list($item);

        return $item;
    }
674297
public function loadByOrderId($orderId, $quoteId)
    {
        $item = $this->getCollection()
            ->loadByOrderIdAndQuoteId($orderId, $quoteId);

        if ($item) {
            return $item;
        } else {
            return $this->setOrderId($orderId)
                ->setQuoteId($quoteId);
        }
    }
44549
public function addCartItem($cartId, $cartItem)
    {
        $cartItem = $this->arraySnakeCase($cartItem);

        $cartItem['cart_id'] = $cartId;
        CartItem::create($cartItem);
    }
276082
public function get($col, $row)
    {
        $this->checkCoords($col, $row);

        return $this->grid{$this->toIndex($col, $row)};
    }
688356
protected function updateRow($rowId, $attributes)
        {
            $cart = $this->getContent();

            $row = $cart->$rowId;

            $row->populate($attributes);

            if(!is_null(array_keys($attributes, array('qty', 'price')))) {
                $row->put('subtotal', $row->qty * $row->price);
            }

            $cart->put($rowId, $row);

            return $cart;
        }
1286813
public function getBid($itemId)
    {
        $item = Item::findOrFail($itemId);

        if (!$item->auction) {
            return redirect($item->url)->withErrors([
                'This item is not an auction, so cannot be bid on.',
            ]);
        }

        $bids = $item->getBidHistory();

        $highest_bid = $bids->first() ?: new Bid();

        if ($bids->isEmpty()) {
            $minimum_bid = $item->startPrice;
        } elseif ($highest_bid->bidder == Auth::user()) {
            $minimum_bid = BidIncrement::getMinimumNextBid($highest_bid->amount);
        } else {
            $minimum_bid = BidIncrement::getMinimumNextBid($item->biddingPrice);
        }

        return view('mustard::item.bid', [
            'item'        => $item,
            'bids'        => $bids,
            'highest_bid' => $highest_bid,
            'minimum_bid' => $minimum_bid,
        ]);
    }