ILIAS  release_8 Revision v8.24
ilListItemAccessCache Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilListItemAccessCache:
+ Collaboration diagram for ilListItemAccessCache:

Public Member Functions

 __construct ()
 
 isDisabled ()
 Check if cache is disabled. More...
 
 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. More...
 
 deleteByRefId (int $ref_id)
 This one can be called, e.g. More...
 
- Public Member Functions inherited from ilCache
 __construct (string $a_component, string $a_cache_name, bool $a_use_long_content=false)
 
 isDisabled ()
 Check if cache is disabled Forced if member view is active. More...
 
 setComponent (string $a_val)
 
 setExpiresAfter (int $a_val)
 Set expires after x seconds. More...
 
 getExpiresAfter ()
 
 getEntry (string $a_id)
 
 getLastAccessStatus ()
 
 storeEntry (string $a_id, string $a_value, ?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
 deleteByAdditionalKeys (?int $a_int_key1=null, ?int $a_int_key2=null, ?string $a_text_key1=null, ?string $a_text_key2=null)
 
 deleteAllEntries ()
 
 deleteEntry (string $a_id)
 

Static Public Attributes

static bool $disabled = false
 

Protected Member Functions

 readEntry (string $id)
 Read an entry. More...
 
- Protected Member Functions inherited from ilCache
 getComponent ()
 
 setName (string $a_val)
 
 getName ()
 
 setUseLongContent (bool $a_val)
 
 getUseLongContent ()
 
 readEntry (string $a_id)
 

Protected Attributes

ilSetting $settings
 
- Protected Attributes inherited from ilCache
string $entry
 
string $last_access
 
int $expires_after
 
bool $use_long_content
 
string $name
 
string $component
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Caches (check) access information on list items.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 26 of file class.ilListItemAccessCache.php.

Constructor & Destructor Documentation

◆ __construct()

ilListItemAccessCache::__construct ( )

Definition at line 32 of file class.ilListItemAccessCache.php.

33 {
34 global $DIC;
35
36 $this->settings = $DIC->settings();
37 parent::__construct("ServicesObject", "CheckAccess");
38 $this->setExpiresAfter(0);
39 self::$disabled = true;
40 }
setExpiresAfter(int $a_val)
Set expires after x seconds.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilCache\setExpiresAfter(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteByRefId()

ilListItemAccessCache::deleteByRefId ( int  $ref_id)

This one can be called, e.g.

Definition at line 81 of file class.ilListItemAccessCache.php.

81 : void
82 {
83 parent::deleteByAdditionalKeys($ref_id);
84 }
$ref_id
Definition: ltiauth.php:67

References $ref_id.

◆ isDisabled()

ilListItemAccessCache::isDisabled ( )

Check if cache is disabled.

Reimplemented from ilCache.

Definition at line 45 of file class.ilListItemAccessCache.php.

45 : bool
46 {
47 return self::$disabled or parent::isDisabled();
48 }

Referenced by readEntry().

+ Here is the caller graph for this function:

◆ readEntry()

ilListItemAccessCache::readEntry ( string  $id)
protected

Read an entry.

Reimplemented from ilCache.

Definition at line 53 of file class.ilListItemAccessCache.php.

53 : bool
54 {
55 if (!$this->isDisabled()) {
56 return parent::readEntry($id);
57 }
58 return false;
59 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
isDisabled()
Check if cache is disabled.

References $id, and isDisabled().

+ Here is the call graph for this function:

◆ storeEntry()

ilListItemAccessCache::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.

Reimplemented from ilCache.

Definition at line 65 of file class.ilListItemAccessCache.php.

72 : void {
73 if (!$this->isDisabled()) {
74 parent::storeEntry($id, $value, $int_key1);
75 }
76 }

References $id.

Field Documentation

◆ $disabled

bool ilListItemAccessCache::$disabled = false
static

Definition at line 28 of file class.ilListItemAccessCache.php.

◆ $settings

ilSetting ilListItemAccessCache::$settings
protected

Definition at line 30 of file class.ilListItemAccessCache.php.


The documentation for this class was generated from the following file: