ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
arFieldCache Class Reference

Class arFieldCache. More...

+ Collaboration diagram for arFieldCache:

Static Public Member Functions

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

Static Protected Attributes

static $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 11 of file class.arFieldCache.php.

Member Function Documentation

◆ get()

static arFieldCache::get ( ActiveRecord  $ar)
static
Parameters
ActiveRecord$ar

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

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

57  {
58  if (!self::isCached($ar)) {
59  self::store($ar);
60  }
61 
62  return self::$cache[get_class($ar)];
63  }
+ Here is the caller graph for this function:

◆ getPrimaryFieldName()

static arFieldCache::getPrimaryFieldName ( ActiveRecord  $ar)
static
Parameters
ActiveRecord$ar
Returns
string

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

Referenced by arConnectorDB\delete(), arViewFields\getPrimaryField(), ActiveRecord\getPrimaryFieldValue(), arConnectorDB\read(), ActiveRecord\setPrimaryFieldValue(), and arConnectorDB\update().

79  {
80  return self::get($ar)->getPrimaryFieldName();
81  }
+ Here is the caller graph for this function:

◆ getPrimaryFieldType()

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

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

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

89  {
90  return self::get($ar)->getPrimaryFieldType();
91  }
+ Here is the caller graph for this function:

◆ isCached()

static arFieldCache::isCached ( ActiveRecord  $ar)
static
Parameters
ActiveRecord$ar
Returns
bool

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

24  {
25  return in_array(get_class($ar), array_keys(self::$cache));
26  }

◆ purge()

static arFieldCache::purge ( ActiveRecord  $ar)
static
Parameters
ActiveRecord$ar

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

69  {
70  unset(self::$cache[get_class($ar)]);
71  }

◆ store()

static arFieldCache::store ( ActiveRecord  $ar)
static
Parameters
ActiveRecord$ar

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

References arFieldList\getInstance().

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

◆ storeFromStorage()

static arFieldCache::storeFromStorage (   $storage_class_name,
arStorageInterface  $foreign_model 
)
static
Parameters
$storage_class_name
\ActiveRecord | \arStorageInterface$foreign_model

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

References arFieldList\getInstanceFromStorage().

44  {
45  self::$cache[$storage_class_name] = arFieldList::getInstanceFromStorage($foreign_model);
46  }
static getInstanceFromStorage($ar)
+ Here is the call graph for this function:

Field Documentation

◆ $cache

arFieldCache::$cache = array()
staticprotected

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


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