25 require_once(
"./classes/class.ilSaxParser.php");
52 $response = split(
"\r\n\r\n",$a_str);
54 $header = $response[0];
59 echo
"netucateResponse::validateInput() : No valid response data!<br/>";
69 if ($this->data[
'response'][
'status'] ==
"error" or $this->data[
'response'][
'status'] ==
"")
79 if ($this->data[
'response'][
'status'] ==
"error" or $this->data[
'response'][
'status'] ==
"")
81 return trim($this->data[
'result'][
'cdata']);
87 return trim($this->data[
'result'][
'cdata']);
92 reset($this->data[
'id']);
93 return current($this->data[
'id']);
104 xml_set_object($a_xml_parser,$this);
105 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
106 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
117 $this->
parse($xml_parser,$this->xml_file);
127 function parse($a_xml_parser,$a_xml_str)
129 $parseOk = xml_parse($a_xml_parser,$a_xml_str,
true);
131 if (!$parseOk && (xml_get_error_code($a_xml_parser) != XML_ERROR_NONE))
133 $this->ilias->raiseError(
"XML Parse Error: ".xml_error_string(xml_get_error_code($a_xml_parser)),$this->ilias->error_obj->FATAL);
147 case "netucate.API.Response":
148 $this->data[
'response'][
'failureCount'] = $a_attribs[
'failureCount'];
149 $this->data[
'response'][
'operationTotal'] = $a_attribs[
'operationTotal'];
150 $this->data[
'response'][
'status'] = $a_attribs[
'status'];
151 $this->data[
'response'][
'successCount'] = $a_attribs[
'successCount'];
154 case "netucate.Result":
155 $this->data[
'result'][
'code'] = $a_attribs[
'code'];
156 $this->data[
'result'][
'id'] = $a_attribs[
'id'];
157 $this->data[
'result'][
'name'] = $a_attribs[
'name'];
158 $this->data[
'result'][
'request'] = $a_attribs[
'request'];
161 case "netucate.ElementID":
162 $this->data[
'element'][
'type'] = $a_attribs[
'type'];
171 case "netucate.Class.List":
172 case "netucate.User.List":
175 case "netucate.Class":
176 $this->data[
'classes'][$a_attribs[
'classid']] = array (
177 'name' => $a_attribs[
'name'],
178 'instructoruserid' => $a_attribs[
'instructoruserid'],
179 'bandwidth' => $a_attribs[
'bandwidth'],
180 'appsharebandwidth' => $a_attribs[
'appsharebandwidth'],
181 'description' => $a_attribs[
'description'],
182 'password' => $a_attribs[
'password'],
183 'message' => $a_attribs[
'message'],
184 'floorpolicy' => $a_attribs[
'floorpolicy'],
185 'conferencetypeid' => $a_attribs[
'conferencetypeid'],
186 'videobandwidth' => $a_attribs[
'videobandwidth'],
187 'videoframerate' => $a_attribs[
'videoframerate'],
188 'enablepush' => $a_attribs[
'enablepush'],
189 'issecure' => $a_attribs[
'issecure'],
190 'alwaysopen' => $a_attribs[
'alwaysopen'],
191 'akclassvalue1' => $a_attribs[
'akclassvalue1'],
192 'akclassvalue2' => $a_attribs[
'akclassvalue2']
196 case "netucate.User":
197 $this->data[
'users'][$a_attribs[
'userid']] = array (
198 'fullname' => $a_attribs[
'fullname'],
199 'authority' => $a_attribs[
'authority'],
200 'email' => $a_attribs[
'email'],
201 'homepage' => $a_attribs[
'homepage'],
202 'contactinfo' => $a_attribs[
'contactinfo'],
203 'comment' => $a_attribs[
'comments'],
204 'phonenumber' => $a_attribs[
'phonenumber'],
205 'akuservalue1' => $a_attribs[
'akuservalue1'],
206 'akuservalue2' => $a_attribs[
'akuservalue2'],
217 case "netucate.API.Response":
218 $this->data[
'response'][
'cdata'] = $this->cdata;
221 case "netucate.Result":
222 $this->data[
'result'][
'cdata'] = $this->cdata;
225 case "netucate.ElementID":
230 $this->data[
'url'][
'cdata'] = trim($this->cdata);
234 $this->data[
'id'][trim($this->cdata)] = trim($this->cdata);
237 case "netucate.Class.List":
238 case "netucate.Class":
239 case "netucate.User.List":
240 case "netucate.User":
254 $this->cdata .= $a_data;