ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
arFieldCache Class Reference

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

+ Collaboration diagram for arFieldCache:

Static Public Member Functions

static isCached (ActiveRecord $activeRecord)
 
static store (ActiveRecord $activeRecord)
 
static storeFromStorage (string $storage_class_name, ActiveRecord $activeRecord)
 
static get (ActiveRecord $activeRecord)
 
static purge (ActiveRecord $activeRecord)
 
static getPrimaryFieldName (ActiveRecord $activeRecord)
 
static getPrimaryFieldType (ActiveRecord $activeRecord)
 

Static Protected Attributes

static array $cache = []
 

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 Class arFieldCache

Version
2.0.7
Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 24 of file class.arFieldCache.php.

Member Function Documentation

◆ get()

static arFieldCache::get ( ActiveRecord  $activeRecord)
static

Definition at line 43 of file class.arFieldCache.php.

44 {
45 if (!self::isCached($activeRecord)) {
46 self::store($activeRecord);
47 }
48
49 return self::$cache[$activeRecord::class];
50 }
static store(ActiveRecord $activeRecord)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References store().

Referenced by ActiveRecord\__construct(), ActiveRecord\getArFieldList(), getPrimaryFieldName(), and getPrimaryFieldType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrimaryFieldName()

static arFieldCache::getPrimaryFieldName ( ActiveRecord  $activeRecord)
static

Definition at line 57 of file class.arFieldCache.php.

57 : string
58 {
59 return self::get($activeRecord)->getPrimaryFieldName();
60 }
static get(ActiveRecord $activeRecord)

References get().

Referenced by ActiveRecord\create(), arConnectorDB\delete(), ActiveRecord\getPrimaryFieldValue(), arConnectorDB\read(), ActiveRecord\setPrimaryFieldValue(), ActiveRecord\store(), and arConnectorDB\update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrimaryFieldType()

static arFieldCache::getPrimaryFieldType ( ActiveRecord  $activeRecord)
static
Returns
mixed

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

65 : string
66 {
67 return self::get($activeRecord)->getPrimaryFieldType();
68 }

References get().

Referenced by arConnectorDB\delete(), arConnectorDB\read(), and arConnectorDB\update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCached()

static arFieldCache::isCached ( ActiveRecord  $activeRecord)
static

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

28 : bool
29 {
30 return array_key_exists($activeRecord::class, self::$cache);
31 }

◆ purge()

static arFieldCache::purge ( ActiveRecord  $activeRecord)
static

Definition at line 52 of file class.arFieldCache.php.

52 : void
53 {
54 unset(self::$cache[$activeRecord::class]);
55 }

◆ store()

static arFieldCache::store ( ActiveRecord  $activeRecord)
static

Definition at line 33 of file class.arFieldCache.php.

33 : void
34 {
35 self::$cache[$activeRecord::class] = arFieldList::getInstance($activeRecord);
36 }
static getInstance(ActiveRecord $activeRecord)

References arFieldList\getInstance().

Referenced by get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeFromStorage()

static arFieldCache::storeFromStorage ( string  $storage_class_name,
ActiveRecord  $activeRecord 
)
static

Definition at line 38 of file class.arFieldCache.php.

38 : void
39 {
40 self::$cache[$storage_class_name] = arFieldList::getInstanceFromStorage($activeRecord);
41 }
static getInstanceFromStorage(\ActiveRecord $activeRecord)

References arFieldList\getInstanceFromStorage().

+ Here is the call graph for this function:

Field Documentation

◆ $cache

array arFieldCache::$cache = []
staticprotected

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


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