summaryrefslogtreecommitdiffstats
path: root/system/libraries/Model.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-12 20:00:22 +0200
committeradmin <devnull@localhost>2006-10-12 20:00:22 +0200
commit0aef222d246da84c90e9a89f31f6677cbe6b4ddc (patch)
tree083195e23940c6ebdebb3076c0363286a8d07445 /system/libraries/Model.php
parent606f99c043272f96f21911d89c21cd36c2ef59e4 (diff)
Diffstat (limited to 'system/libraries/Model.php')
-rw-r--r--system/libraries/Model.php28
1 files changed, 8 insertions, 20 deletions
diff --git a/system/libraries/Model.php b/system/libraries/Model.php
index 48615e07c..017a9c6d8 100644
--- a/system/libraries/Model.php
+++ b/system/libraries/Model.php
@@ -33,10 +33,9 @@ class Model {
*/
function Model()
{
- $this->_assign_libraries(FALSE);
+ $this->_assign_libraries();
log_message('debug', "Model Class Initialized");
}
- // END Model()
/**
* Assign Libraries
@@ -47,26 +46,15 @@ class Model {
*
* @access private
*/
- function _assign_libraries($use_reference = TRUE)
+ function _assign_libraries()
{
- $CI =& get_instance();
- foreach (get_object_vars($CI) as $key => $var)
- {
- if ( ! isset($this->$key))
- {
- if ($use_reference === TRUE)
- {
- $this->$key =& $CI->$key;
- }
- else
- {
- $this->$key = $CI->$key;
- }
- }
- }
-
+ $CI =& get_instance();
+
+ foreach (array_keys(get_object_vars($CI)) as $key)
+ {
+ $this->$key =& $CI->$key;
+ }
}
- // END _assign_libraries()
}
// END Model Class