Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 1 | ############## |
| 2 | Reserved Names |
| 3 | ############## |
| 4 | |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 5 | In order to help out, CodeIgniter uses a series of function, method, |
| 6 | class and variable names in its operation. Because of this, some names |
| 7 | cannot be used by a developer. Following is a list of reserved names |
| 8 | that cannot be used. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 9 | |
| 10 | Controller names |
| 11 | ---------------- |
| 12 | |
| 13 | Since your controller classes will extend the main application |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 14 | controller you must be careful not to name your methods identically to |
| 15 | the ones used by that class, otherwise your local methods will |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 16 | override them. The following is a list of reserved names. Do not name |
| 17 | your controller any of these: |
| 18 | |
vlakoff | 0cd17c3 | 2015-01-04 20:27:29 +0100 | [diff] [blame] | 19 | - CI_Controller |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 20 | - Default |
| 21 | - index |
| 22 | |
| 23 | Functions |
| 24 | --------- |
| 25 | |
Andrey Andreev | cd3d9db | 2015-02-02 13:41:01 +0200 | [diff] [blame] | 26 | - :php:func:`is_php()` |
| 27 | - :php:func:`is_really_writable()` |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 28 | - ``load_class()`` |
vlakoff | 9a6032d | 2013-03-05 23:03:12 +0100 | [diff] [blame] | 29 | - ``is_loaded()`` |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 30 | - ``get_config()`` |
Andrey Andreev | cd3d9db | 2015-02-02 13:41:01 +0200 | [diff] [blame] | 31 | - :php:func:`config_item()` |
| 32 | - :php:func:`show_error()` |
| 33 | - :php:func:`show_404()` |
| 34 | - :php:func:`log_message()` |
| 35 | - :php:func:`set_status_header()` |
| 36 | - :php:func:`get_mimes()` |
| 37 | - :php:func:`html_escape()` |
| 38 | - :php:func:`remove_invisible_characters()` |
| 39 | - :php:func:`is_https()` |
| 40 | - :php:func:`function_usable()` |
| 41 | - :php:func:`get_instance()` |
Andrey Andreev | a0471dc | 2014-11-04 19:22:38 +0200 | [diff] [blame] | 42 | - ``_error_handler()`` |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 43 | - ``_exception_handler()`` |
| 44 | - ``_stringify_attributes()`` |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 45 | |
| 46 | Variables |
| 47 | --------- |
| 48 | |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 49 | - ``$config`` |
| 50 | - ``$db`` |
| 51 | - ``$lang`` |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 52 | |
| 53 | Constants |
| 54 | --------- |
| 55 | |
| 56 | - ENVIRONMENT |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 57 | - FCPATH |
| 58 | - SELF |
| 59 | - BASEPATH |
| 60 | - APPPATH |
vlakoff | 5f733c4 | 2012-09-15 10:48:17 +0200 | [diff] [blame] | 61 | - VIEWPATH |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 62 | - CI_VERSION |
Andrey Andreev | be1496d | 2014-02-11 22:48:45 +0200 | [diff] [blame] | 63 | - MB_ENABLED |
| 64 | - ICONV_ENABLED |
| 65 | - UTF8_ENABLED |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 66 | - FILE_READ_MODE |
| 67 | - FILE_WRITE_MODE |
| 68 | - DIR_READ_MODE |
| 69 | - DIR_WRITE_MODE |
| 70 | - FOPEN_READ |
| 71 | - FOPEN_READ_WRITE |
| 72 | - FOPEN_WRITE_CREATE_DESTRUCTIVE |
| 73 | - FOPEN_READ_WRITE_CREATE_DESTRUCTIVE |
| 74 | - FOPEN_WRITE_CREATE |
| 75 | - FOPEN_READ_WRITE_CREATE |
| 76 | - FOPEN_WRITE_CREATE_STRICT |
vlakoff | b527bb5 | 2013-03-05 21:58:49 +0100 | [diff] [blame] | 77 | - FOPEN_READ_WRITE_CREATE_STRICT |
ftwbzhao | c836f2a | 2015-05-07 18:05:33 +0800 | [diff] [blame] | 78 | - SHOW_DEBUG_BACKTRACE |
vlakoff | b527bb5 | 2013-03-05 21:58:49 +0100 | [diff] [blame] | 79 | - EXIT_SUCCESS |
| 80 | - EXIT_ERROR |
| 81 | - EXIT_CONFIG |
| 82 | - EXIT_UNKNOWN_FILE |
| 83 | - EXIT_UNKNOWN_CLASS |
| 84 | - EXIT_UNKNOWN_METHOD |
| 85 | - EXIT_USER_INPUT |
| 86 | - EXIT_DATABASE |
| 87 | - EXIT__AUTO_MIN |
| 88 | - EXIT__AUTO_MAX |