ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilClassificationSessionRepository.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
11 {
12  const BASE_SESSION_KEY = 'clsfct';
13 
17  protected $base_ref_id;
18 
23  public function __construct(int $base_ref_id)
24  {
25  $this->base_ref_id = $base_ref_id;
26  }
27 
31  public function unsetAll()
32  {
33  unset($_SESSION[self::BASE_SESSION_KEY][$this->base_ref_id]);
34  }
35 
39  public function unsetValueForProvider(string $provider)
40  {
41  unset($_SESSION[self::BASE_SESSION_KEY][$this->base_ref_id][$provider]);
42  }
43 
47  public function isEmpty()
48  {
49  return !isset($_SESSION[self::BASE_SESSION_KEY][$this->base_ref_id]);
50  }
51 
56  public function getValueForProvider(string $provider)
57  {
58  return $_SESSION[self::BASE_SESSION_KEY][$this->base_ref_id][$provider];
59  }
60 
65  public function setValueForProvider($provider, $value)
66  {
67  $_SESSION[self::BASE_SESSION_KEY][$this->base_ref_id][$provider] = $value;
68  }
69 }
$_SESSION["AccountId"]
__construct(int $base_ref_id)
ilClassificationSessionRepository constructor.