コード例 #1
0
 /**
  * @param WishListSetItem $item
  */
 public function addItem(WishListSetItem $item)
 {
     if (count($this->items) === 0) {
         $this->setItemAppId = $item->getAppId();
     } elseif ($this->setItemAppId !== $item->getAppId()) {
         throw new \InvalidArgumentException('you can not set different app ids for items in an item-set.');
     }
     $this->items[] = $item;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  *
  * @return Basket\BasketSetItem
  */
 public function createWishListSetItem(stdClass $jsonObject, array $products)
 {
     return WishList\WishListSetItem::createFromJson($jsonObject, $products);
 }