src/Messenger/Analytics/PostHogCaptureMessage.php line 7

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Messenger\Analytics;
  4. final class PostHogCaptureMessage
  5. {
  6.     /**
  7.      * @param array<string, mixed> $properties
  8.      * @param array<string, mixed>|null $identifyProperties
  9.      */
  10.     public function __construct(
  11.         private readonly string $event,
  12.         private readonly string $distinctId,
  13.         private readonly array $properties = [],
  14.         private readonly ?array $identifyProperties null,
  15.         private readonly ?string $sessionId null,
  16.     ) {
  17.     }
  18.     public function getEvent(): string
  19.     {
  20.         return $this->event;
  21.     }
  22.     public function getDistinctId(): string
  23.     {
  24.         return $this->distinctId;
  25.     }
  26.     /**
  27.      * @return array<string, mixed>
  28.      */
  29.     public function getProperties(): array
  30.     {
  31.         return $this->properties;
  32.     }
  33.     /**
  34.      * @return array<string, mixed>|null
  35.      */
  36.     public function getIdentifyProperties(): ?array
  37.     {
  38.         return $this->identifyProperties;
  39.     }
  40.     public function getSessionId(): ?string
  41.     {
  42.         return $this->sessionId;
  43.     }
  44. }