/** * Function to add item in the item bag * * @param Item $item */ public function addItem(Item $item) { $this->items[$item->getItemId()] = $item; }