24include_once(
'./Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
 
   71        $this->result_string = $a_res;
 
   75            $this->header_parsing = 
true;
 
   90        $this->http_code = $a_code;
 
  132        $this->headers = $a_headers;
 
  142        return $this->headers ? $this->headers : array();
 
  152        if ($this->header_parsing and $this->result_string) {
 
  158        switch ($this->result_type) {
 
  160                if ($this->result_string) {
 
  161                    $this->result = json_decode($this->result_string);
 
  163                    $this->result = array();
 
  168                $this->result = $this->
parseUriList($this->result_string);
 
  183        $pos = strpos($this->result_string, 
"\r\n\r\n");
 
  184        if ($pos !== 
false) {
 
  185            $this->result_header = substr($this->result_string, 0, $pos + 2);
 
  186            $this->result_string = substr($this->result_string, $pos + 2, -1);
 
  189            $this->log->write(__METHOD__ . 
': Cannot find header entry');
 
  203        $location_start = strpos($this->result_header, 
"Location:");
 
  204        if ($location_start !== 
false) {
 
  205            $location_start += 10;
 
  206            $location_end = strpos($this->result_header, 
"\r\n", $location_start);
 
  208            $location = substr($this->result_header, $location_start, $location_end - $location_start);
 
  212        $ecs_sender = strpos($this->result_header, self::HEADER_ECS_SENDER);
 
  213        if ($ecs_sender !== 
false) {
 
  215            $sender_end = strpos($this->result_header, 
"\r\n", $sender_start);
 
  216            $sender = substr($this->result_header, $sender_start, $sender_end - $sender_start);
 
  218            $senders_arr = explode(
',', $sender);
 
  231        include_once 
'Services/WebServices/ECS/classes/class.ilECSUriList.php';
 
  234        foreach ($lines as $line) {
 
  236            if (!strlen($line)) {
 
  239            $uri_parts = explode(
"/", $line);
 
  240            $list->add($line, array_pop($uri_parts));
 
An exception for terminatinating execution or to throw for unit testing.
setHeaders($a_headers)
Set header.
const RESULT_TYPE_URL_LIST
setHTTPCode($a_code)
set HTTP return code
getHTTPCode()
get HTTP code
init()
init result (json_decode) @access private
getPlainResultString()
get unformated result string
splitHeader()
Split header and content.
parseHeader()
Parse header.
__construct($a_res, $with_headers=false, $a_type=self::RESULT_TYPE_JSON)
Constructor.
Presentation of ecs uril (http://...campusconnect/courselinks)
if(isset($_REQUEST['delete'])) $list