ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCmiXapiAbstractReportLinkBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
31{
32 protected int $objId;
33 protected string $aggregateEndPoint;
35
39 public function __construct(
40 int $objId,
41 string $aggregateEndPoint,
43 ) {
44 $this->objId = $objId;
45 $this->aggregateEndPoint = $aggregateEndPoint;
46 $this->filter = $filter;
47 }
48
49 public function getUrl(): string
50 {
51 return $this->appendRequestParameters($this->aggregateEndPoint);
52 }
53
54 //todo ilUtil
55 protected function appendRequestParameters(string $url): string
56 {
58 }
59
60 protected function buildPipelineParameter(): string
61 {
62 $pipeline = urlencode(json_encode($this->buildPipeline()));
63 return "pipeline={$pipeline}";
64 }
65
69 abstract protected function buildPipeline(): array;
70
71 public function getObjId(): int
72 {
73 return $this->objId;
74 }
75
76 public function getAggregateEndPoint(): string
77 {
79 }
80
82 {
83 if (ilObject::_lookupType($this->getObjId()) == 'lti') {
84 return ilObjLTIConsumer::getInstance($this->getObjId(), false);
85 }
86 return ilObjCmiXapi::getInstance($this->getObjId(), false);
87 }
88}
__construct(int $objId, string $aggregateEndPoint, ilCmiXapiStatementsReportFilter $filter)
ilCmiXapiAbstractReportLinkBuilder constructor.
static getInstance(int $a_id=0, bool $a_reference=true)
static getInstance(int $a_id=0, bool $a_reference=true)
static _lookupType(int $id, bool $reference=false)
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
$url
Definition: shib_logout.php:68