Skip to content

Commit

Permalink
Allow to add an array of properties instead of just a single one
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Aug 7, 2023
1 parent e77ac08 commit b935843
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Event/ServerSideEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ final class ServerSideEvent extends StoppableEvent

public ?string $clientId;

public ?Property $property;
/** @var list<Property> */
public array $properties;

/**
* @param string|null $clientId If you do not provide a client id, the client id from the _ga cookie will be used
* @param Property|null $property If you do not provide a property, the property will be resolved from the configured properties or containers
* @param list<Property> $properties If you do not provide properties, the properties will be resolved from the configured properties or containers
*/
public function __construct(Event $event, string $clientId = null, Property $property = null)
public function __construct(Event $event, string $clientId = null, array $properties = [])
{
$this->event = $event;
$this->clientId = $clientId;
$this->property = $property;
$this->properties = $properties;
}
}

0 comments on commit b935843

Please sign in to comment.