ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilCachedCtrl Class Reference

Class ilCachedCtrl. More...

+ Collaboration diagram for ilCachedCtrl:

Public Member Functions

 isActive ()
 
 __destruct ()
 
 lookupModuleClass ($class)
 
 lookupServiceClass ($class)
 
 lookupCid ($cid)
 
 lookupCall ($parent)
 
 lookupClassFile ($class)
 
 getLoaded ()
 
 setLoaded ($loaded)
 
 setCtrlCalls ($ctrl_calls)
 
 getCtrlCalls ()
 
 setCtrlClassfile ($ctrl_classfile)
 
 getCtrlClassfile ()
 
 setModuleClasses ($module_classes)
 
 getModuleClasses ()
 
 setServiceClasses ($service_classes)
 
 getServiceClasses ()
 
 setCtrlClassfileParent ($ctrl_classfile_parent)
 
 getCtrlClassfileParent ()
 

Static Public Member Functions

static getInstance ()
 
static flush ()
 

Protected Member Functions

 __construct ()
 

Protected Attributes

 $changed = false
 
 $loaded = false
 
 $module_classes = array()
 
 $service_classes = array()
 
 $ctrl_calls = array()
 
 $ctrl_classfile = array()
 
 $ctrl_classfile_parent = array()
 

Static Protected Attributes

static $instance
 

Detailed Description

Class ilCachedCtrl.

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

Definition at line 9 of file class.ilCachedCtrl.php.

Constructor & Destructor Documentation

◆ __construct()

ilCachedCtrl::__construct ( )
protected

Definition at line 78 of file class.ilCachedCtrl.php.

References ilGlobalCache\COMP_ILCTRL, and ilGlobalCache\getInstance().

78  {
80  $this->readFromDB();
81  }
static getInstance($component)
+ Here is the call graph for this function:

◆ __destruct()

ilCachedCtrl::__destruct ( )

Definition at line 84 of file class.ilCachedCtrl.php.

References $ilDB.

84  {
85  if ($this->changed) {
86  $this->global_cache->set('ilCachedCtrl', $this);
87  }
88  }

Member Function Documentation

◆ flush()

static ilCachedCtrl::flush ( )
static

Definition at line 64 of file class.ilCachedCtrl.php.

References ilGlobalCache\COMP_ILCTRL, and ilGlobalCache\getInstance().

Referenced by ilCtrlStructureReader\readStructure().

64  {
66  self::$instance = NULL;
67  }
static getInstance($component)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCtrlCalls()

ilCachedCtrl::getCtrlCalls ( )
Returns
array

Definition at line 197 of file class.ilCachedCtrl.php.

References $ctrl_calls.

197  {
198  return $this->ctrl_calls;
199  }

◆ getCtrlClassfile()

ilCachedCtrl::getCtrlClassfile ( )
Returns
array

Definition at line 213 of file class.ilCachedCtrl.php.

References $ctrl_classfile.

213  {
214  return $this->ctrl_classfile;
215  }

◆ getCtrlClassfileParent()

ilCachedCtrl::getCtrlClassfileParent ( )
Returns
array

Definition at line 261 of file class.ilCachedCtrl.php.

References $ctrl_classfile_parent.

261  {
263  }

◆ getInstance()

static ilCachedCtrl::getInstance ( )
static
Returns
ilCachedComponentData

Definition at line 48 of file class.ilCachedCtrl.php.

References ilGlobalCache\COMP_ILCTRL, and ilGlobalCache\getInstance().

Referenced by ilCtrl\callBaseClass(), ilCtrl\getNodeIdForTargetClass(), ilCtrl\lookupClassPath(), ilCtrl\readCidInfo(), and ilCtrl\readClassInfo().

48  {
49  if (!isset(self::$instance)) {
51  $cached_obj = $global_cache->get('ilCachedCtrl');
52  if ($cached_obj instanceof ilCachedCtrl) {
53  self::$instance = $cached_obj;
54  } else {
55  self::$instance = new self();
56  $global_cache->set('ilCachedCtrl', self::$instance);
57  }
58  }
59 
60  return self::$instance;
61  }
static getInstance($component)
Class ilCachedCtrl.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLoaded()

ilCachedCtrl::getLoaded ( )
Returns
boolean

Definition at line 173 of file class.ilCachedCtrl.php.

References $loaded.

173  {
174  return $this->loaded;
175  }

◆ getModuleClasses()

ilCachedCtrl::getModuleClasses ( )
Returns
array

Definition at line 229 of file class.ilCachedCtrl.php.

References $module_classes.

229  {
230  return $this->module_classes;
231  }

◆ getServiceClasses()

ilCachedCtrl::getServiceClasses ( )
Returns
array

Definition at line 245 of file class.ilCachedCtrl.php.

References $service_classes.

245  {
246  return $this->service_classes;
247  }

◆ isActive()

ilCachedCtrl::isActive ( )
Returns
bool

Definition at line 73 of file class.ilCachedCtrl.php.

References ilGlobalCache\COMP_ILCTRL, and ilGlobalCache\getInstance().

73  {
75  }
static getInstance($component)
+ Here is the call graph for this function:

◆ lookupCall()

ilCachedCtrl::lookupCall (   $parent)
Parameters
$parent
Returns
mixed

Definition at line 151 of file class.ilCachedCtrl.php.

References array.

151  {
152  if (is_array($this->ctrl_calls[$parent])) {
153  return $this->ctrl_calls[$parent];
154  } else {
155  return array();
156  }
157  }
Create styles array
The data for the language used.

◆ lookupCid()

ilCachedCtrl::lookupCid (   $cid)
Parameters
$cid
Returns
mixed

Definition at line 141 of file class.ilCachedCtrl.php.

141  {
142  return $this->ctrl_classfile[$cid];
143  }

◆ lookupClassFile()

ilCachedCtrl::lookupClassFile (   $class)
Parameters
$class
Returns
mixed

Definition at line 165 of file class.ilCachedCtrl.php.

165  {
166  return $this->ctrl_classfile_parent[$class];
167  }

◆ lookupModuleClass()

ilCachedCtrl::lookupModuleClass (   $class)
Parameters
$class
Returns
mixed

Definition at line 121 of file class.ilCachedCtrl.php.

121  {
122  return $this->module_classes[$class];
123  }

◆ lookupServiceClass()

ilCachedCtrl::lookupServiceClass (   $class)
Parameters
$class
Returns
mixed

Definition at line 131 of file class.ilCachedCtrl.php.

131  {
132  return $this->service_classes[$class];
133  }

◆ setCtrlCalls()

ilCachedCtrl::setCtrlCalls (   $ctrl_calls)
Parameters
array$ctrl_calls

Definition at line 189 of file class.ilCachedCtrl.php.

References $ctrl_calls.

189  {
190  $this->ctrl_calls = $ctrl_calls;
191  }

◆ setCtrlClassfile()

ilCachedCtrl::setCtrlClassfile (   $ctrl_classfile)
Parameters
array$ctrl_classfile

Definition at line 205 of file class.ilCachedCtrl.php.

References $ctrl_classfile.

205  {
206  $this->ctrl_classfile = $ctrl_classfile;
207  }

◆ setCtrlClassfileParent()

ilCachedCtrl::setCtrlClassfileParent (   $ctrl_classfile_parent)
Parameters
array$ctrl_classfile_parent

Definition at line 253 of file class.ilCachedCtrl.php.

References $ctrl_classfile_parent.

253  {
254  $this->ctrl_classfile_parent = $ctrl_classfile_parent;
255  }

◆ setLoaded()

ilCachedCtrl::setLoaded (   $loaded)
Parameters
boolean$loaded

Definition at line 181 of file class.ilCachedCtrl.php.

References $loaded.

181  {
182  $this->loaded = $loaded;
183  }

◆ setModuleClasses()

ilCachedCtrl::setModuleClasses (   $module_classes)
Parameters
array$module_classes

Definition at line 221 of file class.ilCachedCtrl.php.

References $module_classes.

221  {
222  $this->module_classes = $module_classes;
223  }

◆ setServiceClasses()

ilCachedCtrl::setServiceClasses (   $service_classes)
Parameters
array$service_classes

Definition at line 237 of file class.ilCachedCtrl.php.

References $service_classes.

237  {
238  $this->service_classes = $service_classes;
239  }

Field Documentation

◆ $changed

ilCachedCtrl::$changed = false
protected

Definition at line 14 of file class.ilCachedCtrl.php.

◆ $ctrl_calls

ilCachedCtrl::$ctrl_calls = array()
protected

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

Referenced by getCtrlCalls(), and setCtrlCalls().

◆ $ctrl_classfile

ilCachedCtrl::$ctrl_classfile = array()
protected

Definition at line 38 of file class.ilCachedCtrl.php.

Referenced by getCtrlClassfile(), and setCtrlClassfile().

◆ $ctrl_classfile_parent

ilCachedCtrl::$ctrl_classfile_parent = array()
protected

Definition at line 42 of file class.ilCachedCtrl.php.

Referenced by getCtrlClassfileParent(), and setCtrlClassfileParent().

◆ $instance

ilCachedCtrl::$instance
staticprotected

Definition at line 18 of file class.ilCachedCtrl.php.

◆ $loaded

ilCachedCtrl::$loaded = false
protected

Definition at line 22 of file class.ilCachedCtrl.php.

Referenced by getLoaded(), and setLoaded().

◆ $module_classes

ilCachedCtrl::$module_classes = array()
protected

Definition at line 26 of file class.ilCachedCtrl.php.

Referenced by getModuleClasses(), and setModuleClasses().

◆ $service_classes

ilCachedCtrl::$service_classes = array()
protected

Definition at line 30 of file class.ilCachedCtrl.php.

Referenced by getServiceClasses(), and setServiceClasses().


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