darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 1 | <?php |
darwinel | d8bef8a | 2014-02-11 20:13:22 +0100 | [diff] [blame] | 2 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 3 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 4 | /* |
| 5 | | ------------------------------------------------------------------- |
| 6 | | AUTO-LOADER |
| 7 | | ------------------------------------------------------------------- |
| 8 | | This file specifies which systems should be loaded by default. |
| 9 | | |
| 10 | | In order to keep the framework as light-weight as possible only the |
| 11 | | absolute minimal resources are loaded by default. For example, |
| 12 | | the database is not connected to automatically since no assumption |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 13 | | is made regarding whether you intend to use it. This file lets |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 14 | | you globally define which systems you would like loaded with every |
| 15 | | request. |
| 16 | | |
| 17 | | ------------------------------------------------------------------- |
| 18 | | Instructions |
| 19 | | ------------------------------------------------------------------- |
| 20 | | |
| 21 | | These are the things you can load automatically: |
| 22 | | |
Phil Sturgeon | 9730c75 | 2010-12-15 10:50:15 +0000 | [diff] [blame] | 23 | | 1. Packages |
| 24 | | 2. Libraries |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 25 | | 3. Drivers |
| 26 | | 4. Helper files |
| 27 | | 5. Custom config files |
| 28 | | 6. Language files |
| 29 | | 7. Models |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 30 | | |
| 31 | */ |
| 32 | |
| 33 | /* |
| 34 | | ------------------------------------------------------------------- |
Nic | 4673d42 | 2013-01-09 09:53:41 +0200 | [diff] [blame] | 35 | | Auto-load Packages |
Phil Sturgeon | 9730c75 | 2010-12-15 10:50:15 +0000 | [diff] [blame] | 36 | | ------------------------------------------------------------------- |
| 37 | | Prototype: |
| 38 | | |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 39 | | $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared'); |
Phil Sturgeon | 9730c75 | 2010-12-15 10:50:15 +0000 | [diff] [blame] | 40 | | |
| 41 | */ |
Greg Aker | 4488538 | 2011-04-19 15:28:40 -0500 | [diff] [blame] | 42 | $autoload['packages'] = array(); |
Phil Sturgeon | 9730c75 | 2010-12-15 10:50:15 +0000 | [diff] [blame] | 43 | |
Phil Sturgeon | 9730c75 | 2010-12-15 10:50:15 +0000 | [diff] [blame] | 44 | /* |
| 45 | | ------------------------------------------------------------------- |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 46 | | Auto-load Libraries |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 47 | | ------------------------------------------------------------------- |
Andrey Andreev | 9bb9d07 | 2015-07-10 12:41:25 +0300 | [diff] [blame] | 48 | | These are the classes located in system/libraries/ or your |
| 49 | | application/libraries/ directory, with the addition of the |
| 50 | | 'database' library, which is somewhat of a special case. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 51 | | |
| 52 | | Prototype: |
| 53 | | |
Andrey Andreev | 3a627d1 | 2015-01-26 23:35:50 +0200 | [diff] [blame] | 54 | | $autoload['libraries'] = array('database', 'email', 'session'); |
Andrey Andreev | 88cf55b | 2014-01-17 15:38:30 +0200 | [diff] [blame] | 55 | | |
| 56 | | You can also supply an alternative library name to be assigned |
| 57 | | in the controller: |
| 58 | | |
| 59 | | $autoload['libraries'] = array('user_agent' => 'ua'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 60 | */ |
Luigi Santivetti | 57a98ca | 2020-10-13 22:55:51 +0100 | [diff] [blame^] | 61 | $autoload['libraries'] = array('database', 'session', 'form_validation'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 62 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 63 | /* |
| 64 | | ------------------------------------------------------------------- |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 65 | | Auto-load Drivers |
| 66 | | ------------------------------------------------------------------- |
Andrey Andreev | 9bb9d07 | 2015-07-10 12:41:25 +0300 | [diff] [blame] | 67 | | These classes are located in system/libraries/ or in your |
| 68 | | application/libraries/ directory, but are also placed inside their |
| 69 | | own subdirectory and they extend the CI_Driver_Library class. They |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 70 | | offer multiple interchangeable driver options. |
| 71 | | |
| 72 | | Prototype: |
| 73 | | |
Andrey Andreev | 3a627d1 | 2015-01-26 23:35:50 +0200 | [diff] [blame] | 74 | | $autoload['drivers'] = array('cache'); |
Andrey Andreev | 44d3b18 | 2016-02-15 14:37:14 +0200 | [diff] [blame] | 75 | | |
Andrey Andreev | 5fd4afd | 2016-02-15 14:39:59 +0200 | [diff] [blame] | 76 | | You can also supply an alternative property name to be assigned in |
Andrey Andreev | 44d3b18 | 2016-02-15 14:37:14 +0200 | [diff] [blame] | 77 | | the controller: |
| 78 | | |
Andrey Andreev | 5fd4afd | 2016-02-15 14:39:59 +0200 | [diff] [blame] | 79 | | $autoload['drivers'] = array('cache' => 'cch'); |
| 80 | | |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 81 | */ |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 82 | $autoload['drivers'] = array(); |
| 83 | |
dchill42 | f8f36db | 2012-08-30 14:17:28 -0400 | [diff] [blame] | 84 | /* |
| 85 | | ------------------------------------------------------------------- |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 86 | | Auto-load Helper Files |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 87 | | ------------------------------------------------------------------- |
| 88 | | Prototype: |
| 89 | | |
| 90 | | $autoload['helper'] = array('url', 'file'); |
| 91 | */ |
Luigi Santivetti | 57a98ca | 2020-10-13 22:55:51 +0100 | [diff] [blame^] | 92 | $autoload['helper'] = array('form', 'url'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 93 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 94 | /* |
| 95 | | ------------------------------------------------------------------- |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 96 | | Auto-load Config files |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 97 | | ------------------------------------------------------------------- |
| 98 | | Prototype: |
| 99 | | |
| 100 | | $autoload['config'] = array('config1', 'config2'); |
| 101 | | |
| 102 | | NOTE: This item is intended for use ONLY if you have created custom |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 103 | | config files. Otherwise, leave it blank. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 104 | | |
| 105 | */ |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 106 | $autoload['config'] = array(); |
| 107 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 108 | /* |
| 109 | | ------------------------------------------------------------------- |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 110 | | Auto-load Language files |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 111 | | ------------------------------------------------------------------- |
| 112 | | Prototype: |
| 113 | | |
| 114 | | $autoload['language'] = array('lang1', 'lang2'); |
| 115 | | |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 116 | | NOTE: Do not include the "_lang" part of your file. For example |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 117 | | "codeigniter_lang.php" would be referenced as array('codeigniter'); |
| 118 | | |
| 119 | */ |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 120 | $autoload['language'] = array(); |
| 121 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 122 | /* |
| 123 | | ------------------------------------------------------------------- |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 124 | | Auto-load Models |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 125 | | ------------------------------------------------------------------- |
| 126 | | Prototype: |
| 127 | | |
Andrey Andreev | 5a519db | 2013-01-12 04:19:19 +0200 | [diff] [blame] | 128 | | $autoload['model'] = array('first_model', 'second_model'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 129 | | |
Andrey Andreev | 5a519db | 2013-01-12 04:19:19 +0200 | [diff] [blame] | 130 | | You can also supply an alternative model name to be assigned |
| 131 | | in the controller: |
| 132 | | |
| 133 | | $autoload['model'] = array('first_model' => 'first'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 134 | */ |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 135 | $autoload['model'] = array(); |