|
- <?php
-
- namespace domain\User\UserMessage;
-
- use domain\_\AbstractBuilder;
- use domain\User\User\User;
-
- class UserMessageBuilder extends AbstractBuilder
- {
- public function instanciateUserMessage(User $user, User $createdBy): UserMessage
- {
- $userMessage = new UserMessage();
-
- $userMessage->setUser($user);
- $userMessage->setCreatedAt(new \DateTime());
- $userMessage->setCreatedBy($createdBy);
-
- return $userMessage;
- }
- }
|