Dumplie\Customer\Application\Command\AddToCart::cartId PHP Méthode

cartId() public méthode

public cartId ( ) : string
Résultat string
    public function cartId() : string
    {
        return $this->cartId;
    }

Usage Example

Exemple #1
0
 /**
  * @param AddToCart $command
  *
  * @throws \Exception
  */
 public function handle(AddToCart $command)
 {
     $product = $this->products->getBySku(new SKU($command->sku()));
     $cart = $this->carts->getById(new CartId($command->cartId()));
     $cart->add($product, $command->quantity());
 }