5959 */
6060class BigBlueButton
6161{
62+ /**
63+ * @deprecated Replaced by getter/setter in UrlBuilder-class
64+ */
6265 protected string $ bbbSecret ;
66+
67+ /**
68+ * @deprecated Replaced by getter/setter in UrlBuilder-class
69+ */
6370 protected string $ bbbBaseUrl ;
64- protected string $ jSessionId ;
65- protected string $ hashingAlgorithm ;
6671
67- protected UrlBuilder $ urlBuilder ;
72+ /**
73+ * @deprecated Replaced by getter/setter in UrlBuilder-class
74+ */
75+ protected string $ hashingAlgorithm ;
6876
6977 /**
7078 * @var array<int, mixed>
7179 */
7280 protected array $ curlOpts = [];
7381 protected int $ timeOut = 10 ;
82+ protected string $ jSessionId ;
83+ protected UrlBuilder $ urlBuilder ;
7484
7585 /**
7686 * @param null|array<string, mixed> $opts
@@ -94,11 +104,17 @@ public function __construct(?string $baseUrl = null, ?string $secret = null, ?ar
94104 // nor $this->bbbBaseUrl (only strings), thus FALSE will be converted automatically to an empty
95105 // string (''). Having a bool should be not possible due to the checks above and the automated
96106 // conversion, but PHPStan is still unhappy, so it's covered explicit by adding `?: ''`.
97- $ this ->bbbBaseUrl = $ baseUrl ?: getenv ('BBB_SERVER_BASE_URL ' ) ?: '' ;
98- $ this ->bbbSecret = $ secret ?: getenv ('BBB_SECRET ' ) ?: getenv ('BBB_SECURITY_SALT ' ) ?: '' ;
99- $ this ->hashingAlgorithm = HashingAlgorithm::SHA_256 ;
100- $ this ->urlBuilder = new UrlBuilder ($ this ->bbbSecret , $ this ->bbbBaseUrl , $ this ->hashingAlgorithm );
101- $ this ->curlOpts = $ opts ['curl ' ] ?? [];
107+ $ bbbBaseUrl = $ baseUrl ?: getenv ('BBB_SERVER_BASE_URL ' ) ?: '' ;
108+ $ bbbSecret = $ secret ?: getenv ('BBB_SECRET ' ) ?: getenv ('BBB_SECURITY_SALT ' ) ?: '' ;
109+ $ hashingAlgorithm = HashingAlgorithm::SHA_256 ;
110+
111+ // initialize deprecated properties
112+ $ this ->bbbBaseUrl = $ bbbBaseUrl ;
113+ $ this ->bbbSecret = $ bbbSecret ;
114+ $ this ->hashingAlgorithm = $ hashingAlgorithm ;
115+
116+ $ this ->urlBuilder = new UrlBuilder ($ bbbSecret , $ bbbBaseUrl , $ hashingAlgorithm );
117+ $ this ->curlOpts = $ opts ['curl ' ] ?? [];
102118 }
103119
104120 /**
@@ -469,9 +485,9 @@ public function setTimeOut(int $TimeOutInSeconds): self
469485 }
470486
471487 /**
472- * @deprecated Replaced by same function-name provided by UrlBuilder-BigBlueButton
488+ * @deprecated replaced by same function-name provided by UrlBuilder-BigBlueButton
473489 *
474- * Public accessor for buildUrl.
490+ * Public accessor for buildUrl
475491 */
476492 public function buildUrl (string $ method = '' , string $ params = '' , bool $ append = true ): string
477493 {
0 commit comments