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

Class arCalledClassCache. More...

+ Collaboration diagram for arCalledClassCache:

Static Public Member Functions

static isCached ($class_name)
 
static store ($class_name)
 
static get ($class_name)
 
static purge ($class_name)
 

Static Protected Attributes

static $cache = array()
 

Detailed Description

Class arCalledClassCache.

Version
2.0.7
Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 10 of file class.arCalledClassCache.php.

Member Function Documentation

◆ get()

static arCalledClassCache::get (   $class_name)
static
Parameters
$class_name
Returns
mixed

Definition at line 41 of file class.arCalledClassCache.php.

Referenced by ActiveRecord\getCalledClass().

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

◆ isCached()

static arCalledClassCache::isCached (   $class_name)
static
Parameters
$class_name
Returns
bool

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

23  {
24  return in_array($class_name, array_keys(self::$cache));
25  }

◆ purge()

static arCalledClassCache::purge (   $class_name)
static
Parameters
$class_name

Definition at line 53 of file class.arCalledClassCache.php.

53  {
54  unset(self::$cache[$class_name]);
55  }

◆ store()

static arCalledClassCache::store (   $class_name)
static
Parameters
$class_name

Definition at line 31 of file class.arCalledClassCache.php.

31  {
32  self::$cache[$class_name] = arFactory::getInstance($class_name, NULL);
33  }

Field Documentation

◆ $cache

arCalledClassCache::$cache = array()
staticprotected

Definition at line 15 of file class.arCalledClassCache.php.


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