Subscription enumeration, tweaks
This commit is contained in:
@ -14,6 +14,8 @@ class Topic
|
||||
/** @var array<string,Message> */
|
||||
private array $messages = [];
|
||||
|
||||
private ?string $lastEventId = null;
|
||||
|
||||
/** @var int Creation unixtime */
|
||||
private int $created;
|
||||
|
||||
@ -69,6 +71,21 @@ class Topic
|
||||
$this->subscribers->detach($subscriber);
|
||||
}
|
||||
|
||||
public function getSubscribers(): array
|
||||
{
|
||||
return iterator_to_array($this->subscribers);
|
||||
}
|
||||
|
||||
public function getTopic(): string
|
||||
{
|
||||
return $this->topic;
|
||||
}
|
||||
|
||||
public function getLastEventId(): ?string
|
||||
{
|
||||
return $this->lastEventId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Garbage collect histry
|
||||
*
|
||||
|
Reference in New Issue
Block a user