AdminRecipient.php 870 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 AdminRecipient extends Recipient implements SmsRecipientInterface
  17. {
  18. private $phone;
  19. public function __construct(string $email = '', string $phone = '')
  20. {
  21. parent::__construct($email);
  22. $this->phone = $phone;
  23. }
  24. /**
  25. * @return $this
  26. */
  27. public function phone(string $phone): SmsRecipientInterface
  28. {
  29. $this->phone = $phone;
  30. return $this;
  31. }
  32. public function getPhone(): string
  33. {
  34. return $this->phone;
  35. }
  36. }