CodeExplorer hasMap example
$this->metaItems =
$metaItems;
} public function getCartItems(): LineItemFlatCollection
{ return $this->cartItems;
} public function getCartItem(string
$id): LineItem
{ $map =
$this->
hasMap();
if (isset($map[$id])) { return $map[$id];
} throw CartException::
lineItemNotFound($id);
} public function setCartItems(LineItemFlatCollection
$items): void
{ $this->cartItems =
$items;
}