ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.FlashcardSessionRepository.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Glossary\Flashcard;
22 
27 {
28  public function __construct()
29  {
30  }
31 
35  public function setInitialTerms(int $glo_id, int $user_id, int $box_nr, array $initial_terms): void
36  {
37  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_initial_terms";
38  \ilSession::set($key, $initial_terms);
39  }
40 
44  public function getInitialTerms(int $glo_id, int $user_id, int $box_nr): array
45  {
46  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_initial_terms";
47  if (\ilSession::has($key)) {
49  }
50  return [];
51  }
52 
56  public function setTerms(int $glo_id, int $user_id, int $box_nr, array $terms): void
57  {
58  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_terms";
59  \ilSession::set($key, $terms);
60  }
61 
65  public function getTerms(int $glo_id, int $user_id, int $box_nr): array
66  {
67  $key = self::KEY_BASE . $glo_id . "_" . $user_id . "_" . $box_nr . "_terms";
68  if (\ilSession::has($key)) {
70  }
71  return [];
72  }
73 }
setInitialTerms(int $glo_id, int $user_id, int $box_nr, array $initial_terms)
setTerms(int $glo_id, int $user_id, int $box_nr, array $terms)
get(string $class_name)
static has($a_var)
static set(string $a_var, $a_val)
Set a value.