src/Message/SearchIndexUpdateMessage.php line 5

Open in your IDE?
  1. <?php
  2. namespace App\Message;
  3. class SearchIndexUpdateMessage
  4. {
  5.     public const ACTION_UPSERT 'upsert';
  6.     public const ACTION_UPDATE 'update';
  7.     public const ACTION_REMOVE 'remove';
  8.     /** @var string */
  9.     private $className;
  10.     /** @var int */
  11.     private $id;
  12.     /** @var string */
  13.     private $action;
  14.     public function __construct(string $classNameint $idstring $action self::ACTION_UPSERT)
  15.     {
  16.         $this->className $className;
  17.         $this->id $id;
  18.         $this->action $action;
  19.     }
  20.     public function getClassName(): string
  21.     {
  22.         return $this->className;
  23.     }
  24.     public function getId(): int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getAction(): string
  29.     {
  30.         return $this->action;
  31.     }
  32. }