ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
Returns
arFieldList

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

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

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

◆ getPrimaryFieldName()

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

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

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

83  {
84  return self::get($ar)->getPrimaryFieldName();
85  }
+ Here is the caller graph for this function:

◆ getPrimaryFieldType()

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

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

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

94  {
95  return self::get($ar)->getPrimaryFieldType();
96  }
+ Here is the caller graph for this function:

◆ isCached()

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

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

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

◆ purge()

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

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

72  {
73  unset(self::$cache[get_class($ar)]);
74  }

◆ store()

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

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

References arFieldList\getInstance().

35  {
36  self::$cache[get_class($ar)] = arFieldList::getInstance($ar);
37  }
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 47 of file class.arFieldCache.php.

References arFieldList\getInstanceFromStorage().

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

Field Documentation

◆ $cache

arFieldCache::$cache = array()
staticprotected

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


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