1 | <?php |
||
19 | class Order implements OrderInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var int|string|null |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * @var CustomerInterface |
||
28 | */ |
||
29 | protected $customer; |
||
30 | |||
31 | /** |
||
32 | * @var ActionInterface[] array: actionKey => action |
||
33 | */ |
||
34 | protected $actions = []; |
||
35 | |||
36 | 2 | public function __construct($id, CustomerInterface $customer, array $actions = []) |
|
42 | |||
43 | public static function fromAction(ActionInterface $action) |
||
47 | |||
48 | public static function fromActions(array $actions) |
||
57 | |||
58 | public function getId() |
||
62 | |||
63 | 2 | public function getCustomer() |
|
67 | |||
68 | /** |
||
69 | * Returns actions. |
||
70 | * @return ActionInterface[] array: actionKey => action |
||
71 | */ |
||
72 | 2 | public function getActions() |
|
76 | |||
77 | public function jsonSerialize() |
||
81 | } |
||
82 |