MetadataHeader.php 680 B

1234567891011121314151617181920212223242526272829303132
  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. public function __construct(
  18. private string $key,
  19. string $value,
  20. ) {
  21. parent::__construct('X-Metadata-'.$key, $value);
  22. }
  23. public function getKey(): string
  24. {
  25. return $this->key;
  26. }
  27. }