ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.arCalledClassCache.php
Go to the documentation of this file.
1 <?php
2 
11 
15  protected static $cache = array();
16 
17 
23  public static function isCached($class_name) {
24  return in_array($class_name, array_keys(self::$cache));
25  }
26 
27 
31  public static function store($class_name) {
32  self::$cache[$class_name] = arFactory::getInstance($class_name, NULL);
33  }
34 
35 
41  public static function get($class_name) {
42  if (!self::isCached($class_name)) {
43  self::store($class_name);
44  }
45 
46  return self::$cache[$class_name];
47  }
48 
49 
53  public static function purge($class_name) {
54  unset(self::$cache[$class_name]);
55  }
56 }
57 
58 ?>