ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.FlashcardSessionRepository.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Glossary\Flashcard;
22 
27 {
28  public const KEY_BASE = "glo_flashcard_";
29 
30  public function __construct()
31  {
32  }
33 
34  public function setInitialTerms(int $glo_id, int $user_id, int $box_nr, array $initial_terms): void
35  {
36  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_initial_terms";
37  \ilSession::set($key, $initial_terms);
38  }
39 
43  public function getInitialTerms(int $glo_id, int $user_id, int $box_nr): array
44  {
45  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_initial_terms";
46  if (\ilSession::has($key)) {
48  }
49  return [];
50  }
51 
52  public function setTerms(int $glo_id, int $user_id, int $box_nr, array $terms): void
53  {
54  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_terms";
55  \ilSession::set($key, $terms);
56  }
57 
61  public function getTerms(int $glo_id, int $user_id, int $box_nr): array
62  {
63  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_terms";
64  if (\ilSession::has($key)) {
66  }
67  return [];
68  }
69 }
setInitialTerms(int $glo_id, int $user_id, int $box_nr, array $initial_terms)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTerms(int $glo_id, int $user_id, int $box_nr, array $terms)
string $key
Consumer key/client ID value.
Definition: System.php:193
static has($a_var)
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
static set(string $a_var, $a_val)
Set a value.