Skip to content

Commit

Permalink
allow-direct
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0NL committed Feb 5, 2024
1 parent 8ea9329 commit e873dc1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Stream/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Configuration
private ?int $maxMessageSize = null;
private ?int $maxMessagesPerSubject = null;
private ?string $description = null;
private ?bool $allowDirect = null;

public function __construct(
public readonly string $name
Expand Down Expand Up @@ -193,6 +194,17 @@ public function setSubjects(array $subjects): self
return $this;
}

public function getAllowDirect(): ?bool
{
return $this->allowDirect;
}

public function setAllowDirect(?bool $allowDirect): self
{
$this->allowDirect = $allowDirect;
return $this;
}

public function toArray(): array
{
$config = [
Expand All @@ -211,6 +223,7 @@ public function toArray(): array
'retention' => $this->getRetentionPolicy(),
'storage' => $this->getStorageBackend(),
'subjects' => $this->getSubjects(),
'allow_direct' => $this->getAllowDirect(),
];

foreach ($config as $k => $v) {
Expand Down

0 comments on commit e873dc1

Please sign in to comment.