Dumplie\Customer\Infrastructure\InMemory\InMemoryCarts::getById PHP Méthode

getById() public méthode

public getById ( CartId $cartId ) : Cart
$cartId Dumplie\Customer\Domain\CartId
Résultat Dumplie\Customer\Domain\Cart
    public function getById(CartId $cartId) : Cart
    {
        if (!array_key_exists((string) $cartId, $this->carts)) {
            throw CartNotFoundException::byId($cartId);
        }
        return $this->carts[(string) $cartId];
    }