|
12345678910111213141516171819202122232425262728 |
- <?php
-
- namespace domain\Order\OrderStatusHistory;
-
- use domain\_\AbstractBuilder;
- use domain\Order\Order\Order;
- use domain\Order\OrderStatus\OrderStatus;
- use domain\User\User\User;
-
- class OrderStatusHistoryBuilder extends AbstractBuilder
- {
- public function instanciateOrderStatusHistory(
- Order $order,
- OrderStatus $orderStatus,
- \DateTime $date,
- User $user
- ): OrderStatusHistory
- {
- $orderStatusHistory = new OrderStatusHistory();
-
- $orderStatusHistory->setOrder($order);
- $orderStatusHistory->setOrderStatus($orderStatus);
- $orderStatusHistory->setDate($date);
- $orderStatusHistory->setUser($user);
-
- return $orderStatusHistory;
- }
- }
|