Dumplie\Customer\Infrastructure\Doctrine\ORM\Domain\ORMCarts::exists PHP Method

exists() public method

public exists ( CartId $cartId ) : boolean
$cartId Dumplie\Customer\Domain\CartId
return boolean
    public function exists(CartId $cartId) : bool
    {
        $cart = $this->entityManager->getRepository(Cart::class)->findOneBy(['id.id' => $cartId]);
        return $cart instanceof Cart;
    }