MetadataHeader.php 700 B

12345678910111213141516171819202122232425262728293031323334
  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\Mailer\Header;
  11. use Symfony\Component\Mime\Header\UnstructuredHeader;
  12. /**
  13. * @author Kevin Bond <kevinbond@gmail.com>
  14. */
  15. final class MetadataHeader extends UnstructuredHeader
  16. {
  17. private $key;
  18. public function __construct(string $key, string $value)
  19. {
  20. $this->key = $key;
  21. parent::__construct('X-Metadata-'.$key, $value);
  22. }
  23. public function getKey(): string
  24. {
  25. return $this->key;
  26. }
  27. }