1 | <?php |
||
6 | class Order implements OrderInterface |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | private $id; |
||
12 | |||
13 | /** |
||
14 | * @var ProductInterface[] |
||
15 | */ |
||
16 | private $orderItems = array(); |
||
17 | |||
18 | /** |
||
19 | * @param string $id |
||
20 | */ |
||
21 | public function __construct(string $id) |
||
25 | |||
26 | /** |
||
27 | * @param ProductInterface $orderItem |
||
28 | */ |
||
29 | public function addOrderItem(ProductInterface $orderItem) |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getId(): string |
||
41 | |||
42 | /** |
||
43 | * @return ProductInterface[] |
||
44 | */ |
||
45 | public function getOrderProducts(): array |
||
49 | } |