24include_once(
'./Services/WebServices/ECS/classes/class.ilECSConnectorException.php');
 
   69        $this->result_string = $a_res;
 
   73            $this->header_parsing = 
true;
 
   88        $this->http_code = $a_code;
 
  130        $this->headers = $a_headers;
 
  140        return $this->headers ? $this->headers : array();
 
  150        if ($this->header_parsing and $this->result_string) {
 
  156        switch ($this->result_type) {
 
  158                if ($this->result_string) {
 
  159                    $this->result = json_decode($this->result_string);
 
  161                    $this->result = array();
 
  166                $this->result = $this->
parseUriList($this->result_string);
 
  181        $pos = strpos($this->result_string, 
"\r\n\r\n");
 
  182        if ($pos !== 
false) {
 
  183            $this->result_header = substr($this->result_string, 0, $pos + 2);
 
  184            $this->result_string = substr($this->result_string, $pos + 2, -1);
 
  187            $this->log->write(__METHOD__ . 
': Cannot find header entry');
 
  201        $location_start = strpos($this->result_header, 
"Location:");
 
  202        if ($location_start !== 
false) {
 
  203            $location_start += 10;
 
  204            $location_end = strpos($this->result_header, 
"\r\n", $location_start);
 
  206            $location = substr($this->result_header, $location_start, $location_end - $location_start);
 
  210        $ecs_sender = strpos($this->result_header, self::HEADER_ECS_SENDER);
 
  211        if ($ecs_sender !== 
false) {
 
  213            $sender_end = strpos($this->result_header, 
"\r\n", $sender_start);
 
  214            $sender = substr($this->result_header, $sender_start, $sender_end - $sender_start);
 
  216            $senders_arr = explode(
',', $sender);
 
  229        include_once 
'Services/WebServices/ECS/classes/class.ilECSUriList.php';
 
  232        foreach ($lines as $line) {
 
  234            if (!strlen($line)) {
 
  237            $uri_parts = explode(
"/", $line);
 
  238            $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