diff options
author | Andrey Andreev <narf@devilix.net> | 2014-07-11 18:48:37 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-07-11 18:48:37 +0200 |
commit | ed86ee14f3a36de1034b8fa19ff6d41aeb428a93 (patch) | |
tree | 33d436035a0d1863625aef1b5253611d13532e1a /system/core/CodeIgniter.php | |
parent | 9fa275e6aba369fab6557284a84e2c0dda77da35 (diff) |
Add setting ['composer_autoload']
Supersedes PR #3132
Diffstat (limited to 'system/core/CodeIgniter.php')
-rw-r--r-- | system/core/CodeIgniter.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 3e1280bab..5ff788ae3 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -449,6 +449,23 @@ if ( ! is_php('5.4')) /* * ------------------------------------------------------ + * Should we use a Composer autoloader? + * ------------------------------------------------------ + */ + if (($composer_autoload = config_item('composer_autoload')) !== FALSE) + { + if ($composer_autoload === TRUE && file_exists(APPPATH.'vendor/autoload.php')) + { + require_once(APPPATH.'vendor/autoload.php'); + } + elseif (file_exists($composer_autoload)) + { + require_once($composer_autoload); + } + } + +/* + * ------------------------------------------------------ * Is there a "pre_controller" hook? * ------------------------------------------------------ */ |