ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 44 of file class.arCalledClassCache.php.

Referenced by ActiveRecord\getCalledClass().

45  {
46  if (!self::isCached($class_name)) {
47  self::store($class_name);
48  }
49 
50  return self::$cache[$class_name];
51  }
+ Here is the caller graph for this function:

◆ isCached()

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

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

25  {
26  return in_array($class_name, array_keys(self::$cache));
27  }

◆ purge()

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

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

58  {
59  unset(self::$cache[$class_name]);
60  }

◆ store()

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

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

34  {
35  self::$cache[$class_name] = arFactory::getInstance($class_name, null);
36  }

Field Documentation

◆ $cache

arCalledClassCache::$cache = array()
staticprotected

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


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