Recipient.php 739 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Notifier\Recipient;
  11. /**
  12. * @author Fabien Potencier <fabien@symfony.com>
  13. *
  14. * @experimental in 5.1
  15. */
  16. class Recipient
  17. {
  18. private $email;
  19. public function __construct(string $email = '')
  20. {
  21. $this->email = $email;
  22. }
  23. /**
  24. * @return $this
  25. */
  26. public function email(string $email): self
  27. {
  28. $this->email = $email;
  29. return $this;
  30. }
  31. public function getEmail(): string
  32. {
  33. return $this->email;
  34. }
  35. }