ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCmiXapiAbstractReportLinkBuilder.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
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 
84  public function getObj()
85  {
86  if (ilObject::_lookupType($this->getObjId()) == 'lti') {
87  return ilObjLTIConsumer::getInstance($this->getObjId(), false);
88  }
89  return ilObjCmiXapi::getInstance($this->getObjId(), false);
90  }
91 }
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
static getInstance(int $a_id=0, bool $a_reference=true)
__construct(int $objId, string $aggregateEndPoint, ilCmiXapiStatementsReportFilter $filter)
ilCmiXapiAbstractReportLinkBuilder constructor.
static getInstance(int $a_id=0, bool $a_reference=true)
$url
static _lookupType(int $id, bool $reference=false)