ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ToolIdentificationProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use LogicException;
30{
34 public function contextAwareIdentifier(string $identifier_string, bool $ignore_context = false): IdentificationInterface
35 {
36 if ($ignore_context) {
37 return parent::identifier($identifier_string);
38 }
39 global $DIC;
40
41 $get = $DIC->http()->request()->getQueryParams();
42 if (isset($get['ref_id'])) {
43 $identifier_string .= '_' . $get['ref_id'];
44 }
45
46 return parent::identifier($identifier_string);
47 }
48
52 #[\Override]
53 public function identifier(string $identifier_string): IdentificationInterface
54 {
55 throw new LogicException('Tools must use contextAwareIdentifier');
56 }
57}
contextAwareIdentifier(string $identifier_string, bool $ignore_context=false)
@inheritDoc
global $DIC
Definition: shib_login.php:26