ILIAS  trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
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.

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

43  : \arFieldList
44  {
45  if (!self::isCached($activeRecord)) {
46  self::store($activeRecord);
47  }
48 
49  return self::$cache[$activeRecord::class];
50  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getPrimaryFieldName()

static arFieldCache::getPrimaryFieldName ( ActiveRecord  $activeRecord)
static

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

References ILIAS\GlobalScreen\get().

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

57  : string
58  {
59  return self::get($activeRecord)->getPrimaryFieldName();
60  }
get(string $class_name)
+ 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.

References ILIAS\GlobalScreen\get().

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

65  : string
66  {
67  return self::get($activeRecord)->getPrimaryFieldType();
68  }
get(string $class_name)
+ 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.

References arFieldList\getInstance().

33  : void
34  {
35  self::$cache[$activeRecord::class] = arFieldList::getInstance($activeRecord);
36  }
static getInstance(ActiveRecord $activeRecord)
+ Here is the call graph for this function:

◆ storeFromStorage()

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

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

References arFieldList\getInstanceFromStorage().

38  : void
39  {
40  self::$cache[$storage_class_name] = arFieldList::getInstanceFromStorage($activeRecord);
41  }
static getInstanceFromStorage(\ActiveRecord $activeRecord)
+ 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: