src/Messenger/MonolithEntityEventMessage.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Messenger;
  3. class MonolithEntityEventMessage implements \JsonSerializable
  4. {
  5.     protected string $tableName;
  6.     protected int $entityId;
  7.     public function __construct(string $tableNameint $entityId)
  8.     {
  9.         $this->tableName $tableName;
  10.         $this->entityId $entityId;
  11.     }
  12.     public function setTableName(string $tableName): MonolithEntityEventMessage
  13.     {
  14.         $this->tableName $tableName;
  15.         return $this;
  16.     }
  17.     public function setEntityId(int $entityId): MonolithEntityEventMessage
  18.     {
  19.         $this->entityId $entityId;
  20.         return $this;
  21.     }
  22.     public function jsonSerialize()
  23.     {
  24.         return [
  25.             'table_name' => $this->tableName,
  26.             'entity_id' => $this->entityId,
  27.         ];
  28.     }
  29. }