ILIAS  release_8 Revision v8.24
class.ilListItemAccessCache.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
28 public static bool $disabled = false;
29
31
32 public function __construct()
33 {
34 global $DIC;
35
36 $this->settings = $DIC->settings();
37 parent::__construct("ServicesObject", "CheckAccess");
38 $this->setExpiresAfter(0);
39 self::$disabled = true;
40 }
41
45 public function isDisabled(): bool
46 {
47 return self::$disabled or parent::isDisabled();
48 }
49
53 protected function readEntry(string $id): bool
54 {
55 if (!$this->isDisabled()) {
56 return parent::readEntry($id);
57 }
58 return false;
59 }
60
61
65 public function storeEntry(
66 string $id,
67 string $value,
68 ?int $int_key1 = null,
69 ?int $int_key2 = null,
70 ?string $text_key1 = null,
71 ?string $text_key2 = null
72 ): void {
73 if (!$this->isDisabled()) {
74 parent::storeEntry($id, $value, $int_key1);
75 }
76 }
77
81 public function deleteByRefId(int $ref_id): void
82 {
83 parent::deleteByAdditionalKeys($ref_id);
84 }
85}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setExpiresAfter(int $a_val)
Set expires after x seconds.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readEntry(string $id)
Read an entry.
isDisabled()
Check if cache is disabled.
deleteByRefId(int $ref_id)
This one can be called, e.g.
storeEntry(string $id, string $value, ?int $int_key1=null, ?int $int_key2=null, ?string $text_key1=null, ?string $text_key2=null)
Id is user_id:ref_id, we store ref_if additionally.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc