Skip to content

Commit 0b73ff4

Browse files
committed
Allow to inject the UrlBuilder object.
1 parent 5e57bd8 commit 0b73ff4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/BigBlueButton.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,13 @@ class BigBlueButton
9292
/**
9393
* @param null|array<string, mixed> $opts
9494
*/
95-
public function __construct(?string $baseUrl = null, ?string $secret = null, ?array $opts = []) {
96-
$urlBuilder = UrlBuilder::fromEnvVars($baseUrl, $secret);
95+
public function __construct(
96+
?string $baseUrl = null,
97+
?string $secret = null,
98+
?array $opts = [],
99+
?UrlBuilder $urlBuilder = null,
100+
) {
101+
$urlBuilder ??= UrlBuilder::fromEnvVars($baseUrl, $secret);
97102

98103
// initialize deprecated properties
99104
$this->bbbBaseUrl = $urlBuilder->getBaseUrl();

0 commit comments

Comments
 (0)