ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
arFieldCache Class Reference

Class arFieldCache. More...

+ Collaboration diagram for arFieldCache:

Static Public Member Functions

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

Static Protected Attributes

static array $cache = array()
 

Detailed Description

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 21 of file class.arFieldCache.php.

Member Function Documentation

◆ get()

static arFieldCache::get ( ActiveRecord  $ar)
static

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

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

40  : \arFieldList
41  {
42  if (!self::isCached($ar)) {
43  self::store($ar);
44  }
45 
46  return self::$cache[get_class($ar)];
47  }
Class arFieldList.
+ Here is the caller graph for this function:

◆ getPrimaryFieldName()

static arFieldCache::getPrimaryFieldName ( ActiveRecord  $ar)
static

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

References ILIAS\Repository\get().

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

54  : string
55  {
56  return self::get($ar)->getPrimaryFieldName();
57  }
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrimaryFieldType()

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

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

References ILIAS\Repository\get().

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

62  : string
63  {
64  return self::get($ar)->getPrimaryFieldType();
65  }
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCached()

static arFieldCache::isCached ( ActiveRecord  $ar)
static

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

25  : bool
26  {
27  return array_key_exists(get_class($ar), self::$cache);
28  }

◆ purge()

static arFieldCache::purge ( ActiveRecord  $ar)
static

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

49  : void
50  {
51  unset(self::$cache[get_class($ar)]);
52  }

◆ store()

static arFieldCache::store ( ActiveRecord  $ar)
static

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

References arFieldList\getInstance().

30  : void
31  {
32  self::$cache[get_class($ar)] = arFieldList::getInstance($ar);
33  }
static getInstance(ActiveRecord $ar)
+ Here is the call graph for this function:

◆ storeFromStorage()

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

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

References arFieldList\getInstanceFromStorage().

35  : void
36  {
37  self::$cache[$storage_class_name] = arFieldList::getInstanceFromStorage($foreign_model);
38  }
static getInstanceFromStorage(\ActiveRecord $ar)
+ Here is the call graph for this function:

Field Documentation

◆ $cache

array arFieldCache::$cache = array()
staticprotected

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


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