You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
462B

  1. <?php
  2. namespace domain\User\UserMessage;
  3. use domain\_\AbstractBuilder;
  4. use domain\User\User\User;
  5. class UserMessageBuilder extends AbstractBuilder
  6. {
  7. public function instanciateUserMessage(User $user, User $createdBy): UserMessage
  8. {
  9. $userMessage = new UserMessage();
  10. $userMessage->setUser($user);
  11. $userMessage->setCreatedAt(new \DateTime());
  12. $userMessage->setCreatedBy($createdBy);
  13. return $userMessage;
  14. }
  15. }