Skip to content

Commit 9ae8bea

Browse files
authored
Merge pull request #171 from denis-b/master
2 parents 749be56 + 9e2dbdf commit 9ae8bea

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/BigBlueButton.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ class BigBlueButton
6565
* @param null $baseUrl
6666
* @param null $secret
6767
*/
68-
public function __construct($baseUrl = null, $secret = null)
68+
public function __construct($baseUrl = null, $secret = null, $opts = null)
6969
{
7070
// Keeping backward compatibility with older deployed versions
7171
// BBB_SECRET is the new variable name and have higher priority against the old named BBB_SECURITY_SALT
7272
$this->securitySecret = $secret ?: getenv('BBB_SECRET') ?: getenv('BBB_SECURITY_SALT');
7373
$this->bbbServerBaseUrl = $baseUrl ?: getenv('BBB_SERVER_BASE_URL');
7474
$this->urlBuilder = new UrlBuilder($this->securitySecret, $this->bbbServerBaseUrl);
75+
$this->curlopts = $opts['curl'] ?? [];
7576
}
7677

7778
/**
@@ -396,6 +397,14 @@ public function setJSessionId($jSessionId)
396397
$this->jSessionId = $jSessionId;
397398
}
398399

400+
/**
401+
* @param array $curlopts
402+
*/
403+
public function setCurlOpts($curlopts)
404+
{
405+
$this->curlopts = $curlopts;
406+
}
407+
399408
/* ____________________ INTERNAL CLASS METHODS ___________________ */
400409

401410
/**
@@ -420,6 +429,9 @@ private function processXmlResponse($url, $payload = '', $contentType = 'applica
420429
$cookiefile = tmpfile();
421430
$cookiefilepath = stream_get_meta_data($cookiefile)['uri'];
422431

432+
foreach ($this->curlopts as $opt => $value){
433+
curl_setopt($ch, $opt, $value);
434+
}
423435
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
424436
curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
425437
curl_setopt($ch, CURLOPT_URL, $url);

0 commit comments

Comments
 (0)