1 | <?php |
||
19 | final class CartItemAdded implements SerializableInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var UuidInterface |
||
23 | */ |
||
24 | private $cartId; |
||
25 | |||
26 | /** |
||
27 | * @var CartItem |
||
28 | */ |
||
29 | private $cartItem; |
||
30 | |||
31 | /** |
||
32 | * @param UuidInterface $cartId |
||
33 | * @param CartItem $cartItem |
||
34 | */ |
||
35 | private function __construct(UuidInterface $cartId, CartItem $cartItem) |
||
40 | |||
41 | /** |
||
42 | * @param UuidInterface $cartId |
||
43 | * @param CartItem $cartItem |
||
44 | * |
||
45 | * @return CartItemAdded |
||
46 | */ |
||
47 | public static function occur(UuidInterface $cartId, CartItem $cartItem): self |
||
51 | |||
52 | /** |
||
53 | * @return UuidInterface |
||
54 | */ |
||
55 | public function getCartId(): UuidInterface |
||
59 | |||
60 | /** |
||
61 | * @return CartItem |
||
62 | */ |
||
63 | public function getCartItem(): CartItem |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public static function deserialize(array $data) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function serialize() |
||
97 | } |
||
98 |