18 declare(strict_types=1);
    33         $this->
logger->info(__METHOD__ . 
': Add new course url ...');
    35         $this->path_postfix = 
'/campusconnect/course_urls';
    40             $this->
addHeader(
'Content-Type', 
'application/json');
    41             $this->
addHeader(
'Accept', 
'application/json');
    44             $this->curl->setOpt(CURLOPT_HTTPHEADER, $this->
getHeader());
    45             $this->curl->setOpt(CURLOPT_POST, 
true);
    46             $this->curl->setOpt(CURLOPT_POSTFIELDS, json_encode($url, JSON_THROW_ON_ERROR));
    48             $this->
logger->debug(
'Sending url ' . print_r(json_encode($url, JSON_THROW_ON_ERROR), 
true));
    52             $info = $this->curl->getInfo(CURLINFO_HTTP_CODE);
    54             $this->
logger->debug(
'Checking HTTP status...');
    55             if ($info !== self::HTTP_CODE_CREATED) {
    56                 $this->
logger->debug(
'Cannot create course url ressource, did not receive HTTP 201. ');
    57                 $this->
logger->debug(
'POST was: ' . json_encode($url, JSON_THROW_ON_ERROR));
    58                 $this->
logger->debug(
'HTTP code: ' . $info);
    61             $this->
logger->debug(
'... got HTTP 201 (created)');
 
addUrl(ilECSCourseUrl $url, $a_target_mid)
Send url of newly created courses to ecs. 
 
addHeader(string $a_name, string $a_value)
Add Header. 
 
Connector for writing ecs course urls. 
 
Represents a ecs course url. 
 
prepareConnection()
prepare connection