src/V4/Event/PostPersistEvent.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\V4\Event;
  3. use Symfony\Contracts\EventDispatcher\Event;
  4. class PostPersistEvent extends Event
  5. {
  6.     public const NAME 'post_persist';
  7.     /**
  8.      * @var object|null
  9.      */
  10.     private $before;
  11.     /**
  12.      * @var object
  13.      */
  14.     private $after;
  15.     private $context = [];
  16.     /**
  17.      * @param object|null $before
  18.      *
  19.      * @return self
  20.      */
  21.     public function setBefore(?object $before): self
  22.     {
  23.         $this->before $before;
  24.         return $this;
  25.     }
  26.     /**
  27.      * @return object|null
  28.      */
  29.     public function getBefore(): ?object
  30.     {
  31.         return $this->before;
  32.     }
  33.     /**
  34.      * @param object $after
  35.      *
  36.      * @return self
  37.      */
  38.     public function setAfter(object $after): self
  39.     {
  40.         $this->after $after;
  41.         return $this;
  42.     }
  43.     /**
  44.      * @return object
  45.      */
  46.     public function getAfter(): object
  47.     {
  48.         return $this->after;
  49.     }
  50.     public function getContext(): array
  51.     {
  52.         return $this->context;
  53.     }
  54.     public function setContext(array $context): PostPersistEvent
  55.     {
  56.         $this->context $context;
  57.         return $this;
  58.     }
  59. }