We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c700420 commit 5b7f4c5Copy full SHA for 5b7f4c5
1 file changed
Core/core/Base_Action.php
@@ -15,10 +15,28 @@ public function __construct()
15
log_message('debug', "Action Class Initialized");
16
}
17
18
- function __get($key)
+ /**
19
+ * __get magic
20
+ *
21
+ * Allows models to access CI's loaded classes using the same
22
+ * syntax as controllers.
23
24
+ * This is the same as what CI's model uses, but we keep it
25
+ * here since that's the ONLY thing that CI's model does.
26
27
+ * @param string $key
28
+ */
29
+ public function __get($key)
30
{
31
+ // Give access to protected class vars
32
+ if (isset($this->$key))
33
+ {
34
+ return $this->$key;
35
+ }
36
+
37
$CI = &get_instance();
38
return $CI->$key;
39
40
41
42
/* end of file Base_Action.php */
0 commit comments