diff options
author | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:46:16 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:46:16 +0200 |
commit | bb451aa0e4853f9afd4263769eeea1d9aad3a600 (patch) | |
tree | aa3770006128ab46d570e6b6aad756e4e92299d9 /system/core/Loader.php | |
parent | e76217041ddcae80f11b50b44a7d409b6722ad40 (diff) | |
parent | a9da3dd2f16a8f97d7bc4ff5572b28e4bb84c813 (diff) |
Merge branch '3.1-stable'
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r-- | system/core/Loader.php | 14 |
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; } |