$value) { if (is_array($value)) { $unwrap($value, $target, [ ...$path, $key ]); } else { $key = join(".", [ ...$path, $key ]); $target->config[$key] = $value; } } }; $unwrap($yaml, $config); return $config; } public function setPublicUrl(string $publicUrl): self { $this->config['server.public_url'] = $publicUrl; return $this; } public function getPublicUrl(): ?string { return $this->config['server.public_url']??null; } public function setJwtSecret(string $secret): self { $this->config['security.jwt_secret'] = $secret; return $this; } public function getJwtSecret(): ?string { return $this->config['security.jwt_secret']??null; } function getAllowAnonymousSubscribe():bool { return $this->config['subscribe.allow_anonymous']??false; } function setAllowAnonymousSubscribe(bool $allowAnonymousSubscribe): self { $this->config['subscribe.allow_anonymous'] = $allowAnonymousSubscribe; return $this; } public function setListenAddress(string $address): self { $this->config['server.address'] = $address; return $this; } public function getListenAddress(): ?string { return $this->config['server.address']??null; } public function setAllowOriginHeader(string $value): self { $this->config['headers.allow_origin'] = $value; return $this; } public function setContentSecurityPolicyHeader(string $value): self { $this->config['headers.csp'] = $value; return $this; } }