ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.FlashcardSessionRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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}
setTerms(int $glo_id, int $user_id, int $box_nr, array $terms)
setInitialTerms(int $glo_id, int $user_id, int $box_nr, array $initial_terms)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)
get(string $class_name)