ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
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.

41 {
42 if (!self::isCached($ar)) {
43 self::store($ar);
44 }
45
46 return self::$cache[get_class($ar)];
47 }
static store(ActiveRecord $ar)
Class arFieldList.

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  $ar)
static

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

54 : string
55 {
56 return self::get($ar)->getPrimaryFieldName();
57 }
static get(ActiveRecord $ar)

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  $ar)
static
Returns
mixed

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

62 : string
63 {
64 return self::get($ar)->getPrimaryFieldType();
65 }

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  $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.

30 : void
31 {
32 self::$cache[get_class($ar)] = arFieldList::getInstance($ar);
33 }
static getInstance(ActiveRecord $ar)

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  $foreign_model 
)
static

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

35 : void
36 {
37 self::$cache[$storage_class_name] = arFieldList::getInstanceFromStorage($foreign_model);
38 }
static getInstanceFromStorage(\ActiveRecord $ar)

References arFieldList\getInstanceFromStorage().

+ 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: