| 1 | <?php |
||
| 16 | class UserMessage implements MessageInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Subject. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $subject; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Message. |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $body; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Template handler. |
||
| 34 | * |
||
| 35 | * @var TemplateHandler |
||
| 36 | */ |
||
| 37 | protected $template; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Constructor. |
||
| 41 | */ |
||
| 42 | public function __construct(string $subject, string $body, TemplateHandler $template) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | public function getSubject(User $user): string |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | public function getBody(User $user): string |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | public function renderTemplate(string $template, User $user): string |
||
| 81 | } |
||
| 82 |