vendor/api-platform/core/src/Symfony/Messenger/ContextStamp.php line 23

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the API Platform project.
  4.  *
  5.  * (c) Kévin Dunglas <[email protected]>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Symfony\Messenger;
  12. use Symfony\Component\Messenger\Stamp\StampInterface;
  13. /**
  14.  * An envelope stamp with context which related to a message.
  15.  *
  16.  * @author Sergii Pavlenko <[email protected]>
  17.  */
  18. final class ContextStamp implements StampInterface
  19. {
  20.     private $context;
  21.     public function __construct(array $context = [])
  22.     {
  23.         $this->context $context;
  24.     }
  25.     /**
  26.      * Get the context related to a message.
  27.      */
  28.     public function getContext(): array
  29.     {
  30.         return $this->context;
  31.     }
  32. }
  33. class_alias(ContextStamp::class, \ApiPlatform\Core\Bridge\Symfony\Messenger\ContextStamp::class);