ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.Box.php:21
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.