public getById ( |
||
$cartId | ||
리턴 |
public function getById(CartId $cartId) : Cart
{
if (!array_key_exists((string) $cartId, $this->carts)) {
throw CartNotFoundException::byId($cartId);
}
return $this->carts[(string) $cartId];
}