summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 085c5b51d..c84aff35a 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
- * Copyright (c) 2014 - 2017, British Columbia Institute of Technology
+ * Copyright (c) 2014 - 2018, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
- * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
+ * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
@@ -226,7 +226,7 @@ class CI_Loader {
*
* Loads and instantiates models.
*
- * @param string $model Model name
+ * @param mixed $model Model name
* @param string $name An optional object name to assign to
* @param bool $db_conn An optional database connection configuration to initialize
* @return object
@@ -303,6 +303,8 @@ class CI_Loader {
{
throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
}
+
+ log_message('info', 'CI_Model class loaded');
}
elseif ( ! class_exists('CI_Model', FALSE))
{
@@ -317,6 +319,8 @@ class CI_Loader {
{
throw new RuntimeException($app_path.$class.".php exists, but doesn't declare class ".$class);
}
+
+ log_message('info', config_item('subclass_prefix').'Model class loaded');
}
}
@@ -350,7 +354,9 @@ class CI_Loader {
}
$this->_ci_models[] = $name;
- $CI->$name = new $model();
+ $model = new $model();
+ $CI->$name = $model;
+ log_message('info', 'Model "'.get_class($model).'" initialized');
return $this;
}