24 include_once(
'./Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
58 public function __construct($a_res, $a_type = self::RESULT_TYPE_JSON)
62 $ilLog = $DIC[
'ilLog'];
66 $this->result_string = $a_res;
67 $this->result_type = $a_type;
81 $this->http_code = $a_code;
123 $this->headers = $a_headers;
133 return $this->headers ?: [];
143 switch ($this->result_type) {
144 case self::RESULT_TYPE_JSON:
145 if ($this->result_string) {
146 $this->result = json_decode($this->result_string);
148 $this->result = array();
152 case self::RESULT_TYPE_URL_LIST:
153 $this->result = $this->
parseUriList($this->result_string);
166 include_once
'Services/WebServices/ECS/classes/class.ilECSUriList.php';
169 foreach ($lines as $line) {
171 if (!strlen($line)) {
174 $uri_parts = explode(
"/", $line);
175 $list->add($line, array_pop($uri_parts));
const RESULT_TYPE_URL_LIST
Presentation of ecs uril (http://...campusconnect/courselinks)
setHeaders($a_headers)
Set header.
getPlainResultString()
get unformated result string
setHTTPCode($a_code)
set HTTP return code
__construct($a_res, $a_type=self::RESULT_TYPE_JSON)
Constructor.
getHTTPCode()
get HTTP code
init()
init result (json_decode) private