summaryrefslogtreecommitdiffstats
path: root/system/core/Model.php
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
commite917f9be8b05c81357c1c2c9730d5060685d644d (patch)
treeb6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /system/core/Model.php
parent5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff)
parente1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'system/core/Model.php')
-rw-r--r--system/core/Model.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/core/Model.php b/system/core/Model.php
index 16c4e7dd8..ebbb0fbe6 100644
--- a/system/core/Model.php
+++ b/system/core/Model.php
@@ -37,11 +37,11 @@ class CI_Model {
{
// If the magic __get() or __set() methods are used in a Model references can't be used.
$this->_assign_libraries( (method_exists($this, '__get') OR method_exists($this, '__set')) ? FALSE : TRUE );
-
+
// We don't want to assign the model object to itself when using the
// assign_libraries function below so we'll grab the name of the model parent
$this->_parent_name = ucfirst(get_class($this));
-
+
log_message('debug', "Model Class Initialized");
}
@@ -50,17 +50,17 @@ class CI_Model {
*
* Creates local references to all currently instantiated objects
* so that any syntax that can be legally used in a controller
- * can be used within models.
+ * can be used within models.
*
* @access private
- */
+ */
function _assign_libraries($use_reference = TRUE)
{
- $CI =& get_instance();
+ $CI =& get_instance();
foreach (array_keys(get_object_vars($CI)) as $key)
{
if ( ! isset($this->$key) AND $key != $this->_parent_name)
- {
+ {
// In some cases using references can cause
// problems so we'll conditionally use them
if ($use_reference == TRUE)
@@ -74,7 +74,7 @@ class CI_Model {
$this->$key = $CI->$key;
}
}
- }
+ }
}
}