ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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.

78 {
80 $this->readFromDB();
81 }
static getInstance($component)

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

+ Here is the call graph for this function:

◆ __destruct()

ilCachedCtrl::__destruct ( )

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

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.

64 {
66 self::$instance = NULL;
67 }

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

Referenced by ilCtrlStructureReader\readStructure().

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

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

References $ctrl_calls.

◆ getCtrlClassfile()

ilCachedCtrl::getCtrlClassfile ( )
Returns
array

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

213 {
215 }

References $ctrl_classfile.

◆ getCtrlClassfileParent()

ilCachedCtrl::getCtrlClassfileParent ( )
Returns
array

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

261 {
263 }

References $ctrl_classfile_parent.

◆ getInstance()

static ilCachedCtrl::getInstance ( )
static
Returns
ilCachedComponentData

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

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 }
Class ilCachedCtrl.

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

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

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

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

References $loaded.

◆ getModuleClasses()

ilCachedCtrl::getModuleClasses ( )
Returns
array

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

229 {
231 }

References $module_classes.

◆ getServiceClasses()

ilCachedCtrl::getServiceClasses ( )
Returns
array

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

245 {
247 }

References $service_classes.

◆ isActive()

ilCachedCtrl::isActive ( )
Returns
bool

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

73 {
75 }

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

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

151 {
152 if (is_array($this->ctrl_calls[$parent])) {
153 return $this->ctrl_calls[$parent];
154 } else {
155 return array();
156 }
157 }

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

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

References $ctrl_calls.

◆ setCtrlClassfile()

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

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

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

References $ctrl_classfile.

◆ setCtrlClassfileParent()

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

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

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

References $ctrl_classfile_parent.

◆ setLoaded()

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

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

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

References $loaded.

◆ setModuleClasses()

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

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

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

References $module_classes.

◆ setServiceClasses()

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

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

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

References $service_classes.

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.

Referenced by getInstance().

◆ $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: