ILIAS  release_8 Revision v8.24
class.NavigationSessionRepository.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
27{
28 public const KEY = "il_nav_history";
29
30 public function __construct()
31 {
32 }
33
34 public function setHistory(array $hist): void
35 {
36 \ilSession::set(self::KEY, serialize($hist));
37 }
38
39 public function getHistory(): array
40 {
41 if (\ilSession::has(self::KEY)) {
42 return unserialize(\ilSession::get(self::KEY), ['allowed_classes' => false]);
43 }
44 return [];
45 }
46}
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...