ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ToolIdentificationProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
21 
22 use LogicException;
29 {
33  public function contextAwareIdentifier(string $identifier_string, bool $ignore_context = false) : IdentificationInterface
34  {
35  if ($ignore_context) {
36  return parent::identifier($identifier_string);
37  }
38  global $DIC;
39 
40  $get = $DIC->http()->request()->getQueryParams();
41  if (isset($get['ref_id'])) {
42  $identifier_string .= '_' . $get['ref_id'];
43  }
44 
45  return parent::identifier($identifier_string);
46  }
47 
51  public function identifier(string $identifier_string) : IdentificationInterface
52  {
53  throw new LogicException('Tools must use contextAwareIdentifier');
54  }
55 }
global $DIC
Definition: goto.php:24
contextAwareIdentifier(string $identifier_string, bool $ignore_context=false)