Skip to content

Commit

Permalink
Added UserRecipient class
Browse files Browse the repository at this point in the history
  • Loading branch information
webhdx committed Jan 11, 2024
1 parent c708abb commit a471c89
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/contracts/Value/Recipent/UserRecipient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\Contracts\Notifications\Value\Recipent;

use Ibexa\Contracts\Core\Repository\Values\User\User;
use Symfony\Component\Notifier\Recipient\EmailRecipientInterface;

final class UserRecipient implements EmailRecipientInterface
{
private User $user;

public function __construct(User $user)
{
$this->user = $user;
}

public function getEmail(): string
{
return $this->user->email;
}
}

0 comments on commit a471c89

Please sign in to comment.