3535use BigBlueButton \Responses \CreateMeetingResponse ;
3636use BigBlueButton \Responses \DeleteRecordingsResponse ;
3737use BigBlueButton \Responses \EndMeetingResponse ;
38- use BigBlueButton \Responses \GetDefaultConfigXMLResponse ;
3938use BigBlueButton \Responses \GetMeetingInfoResponse ;
4039use BigBlueButton \Responses \GetMeetingsResponse ;
4140use BigBlueButton \Responses \GetRecordingsResponse ;
4544use BigBlueButton \Responses \IsMeetingRunningResponse ;
4645use BigBlueButton \Responses \JoinMeetingResponse ;
4746use BigBlueButton \Responses \PublishRecordingsResponse ;
48- use BigBlueButton \Responses \SetConfigXMLResponse ;
4947use BigBlueButton \Responses \UpdateRecordingsResponse ;
5048use BigBlueButton \Util \UrlBuilder ;
5149use SimpleXMLElement ;
@@ -60,6 +58,7 @@ class BigBlueButton
6058 protected $ bbbServerBaseUrl ;
6159 protected $ urlBuilder ;
6260 protected $ jSessionId ;
61+ protected $ timeOut = 10 ;
6362
6463 /**
6564 * BigBlueButton constructor.
@@ -90,8 +89,6 @@ public function getApiVersion()
9089 /* __________________ BBB ADMINISTRATION METHODS _________________ */
9190 /* The methods in the following section support the following categories of the BBB API:
9291 -- create
93- -- getDefaultConfigXML
94- -- setConfigXML
9592 -- join
9693 -- end
9794 */
@@ -117,47 +114,6 @@ public function createMeeting($createMeetingParams)
117114 return new CreateMeetingResponse ($ xml );
118115 }
119116
120- /**
121- * @return string
122- */
123- public function getDefaultConfigXMLUrl ()
124- {
125- return $ this ->urlBuilder ->buildUrl (ApiMethod::GET_DEFAULT_CONFIG_XML );
126- }
127-
128- /**
129- * @return GetDefaultConfigXMLResponse
130- * @throws \RuntimeException
131- */
132- public function getDefaultConfigXML ()
133- {
134- $ xml = $ this ->processXmlResponse ($ this ->getDefaultConfigXMLUrl ());
135-
136- return new GetDefaultConfigXMLResponse ($ xml );
137- }
138-
139- /**
140- * @return string
141- */
142- public function setConfigXMLUrl ()
143- {
144- return $ this ->urlBuilder ->buildUrl (ApiMethod::SET_CONFIG_XML , '' , false );
145- }
146-
147- /**
148- * @param $setConfigXMLParams
149- * @return SetConfigXMLResponse
150- * @throws \RuntimeException
151- */
152- public function setConfigXML ($ setConfigXMLParams )
153- {
154- $ setConfigXMLPayload = $ this ->urlBuilder ->buildQs (ApiMethod::SET_CONFIG_XML , $ setConfigXMLParams ->getHTTPQuery ());
155-
156- $ xml = $ this ->processXmlResponse ($ this ->setConfigXMLUrl (), $ setConfigXMLPayload , 'application/x-www-form-urlencoded ' );
157-
158- return new SetConfigXMLResponse ($ xml );
159- }
160-
161117 /**
162118 * @param $joinMeetingParams JoinMeetingParameters
163119 *
@@ -504,7 +460,19 @@ private function processXmlResponse($url, $payload = '', $contentType = 'applica
504460 throw new \RuntimeException ('Post XML data set but curl PHP module is not installed or not enabled. ' );
505461 }
506462 }
507-
463+
464+ /**
465+ * Set Curl Timeout (Optional), Default 10 Seconds
466+ * @param int $TimeOutInSeconds
467+ * @return static
468+ */
469+ public function setTimeOut ($ TimeOutInSeconds )
470+ {
471+ $ this ->timeOut = $ TimeOutInSeconds ;
472+
473+ return $ this ;
474+ }
475+
508476 /**
509477 * Public accessor for buildUrl
510478 * @param string $method
@@ -516,5 +484,4 @@ public function buildUrl($method = '', $params = '', $append = TRUE)
516484 {
517485 return $ this ->urlBuilder ->buildUrl ($ method , $ params , $ append );
518486 }
519-
520487}
0 commit comments