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 | |
| 19 | - Controller |
| 20 | - CI_Base |
| 21 | - _ci_initialize |
| 22 | - Default |
| 23 | - index |
| 24 | |
| 25 | Functions |
| 26 | --------- |
| 27 | |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 28 | - :php:func:`is_really_writable()` |
| 29 | - ``load_class()`` |
| 30 | - ``get_config()`` |
| 31 | - :php:func:`config_item()` |
| 32 | - :php:func:`show_error()` |
| 33 | - :php:func:`show_404()` |
| 34 | - :php:func:`log_message()` |
| 35 | - :php:func:`get_mimes()` |
| 36 | - :php:func:`html_escape()` |
| 37 | - :php:func:`get_instance()` |
| 38 | - ``_exception_handler()`` |
| 39 | - ``_stringify_attributes()`` |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 40 | |
| 41 | Variables |
| 42 | --------- |
| 43 | |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 44 | - ``$config`` |
| 45 | - ``$db`` |
| 46 | - ``$lang`` |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 47 | |
| 48 | Constants |
| 49 | --------- |
| 50 | |
| 51 | - ENVIRONMENT |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 52 | - FCPATH |
| 53 | - SELF |
| 54 | - BASEPATH |
| 55 | - APPPATH |
vlakoff | 5f733c4 | 2012-09-15 10:48:17 +0200 | [diff] [blame] | 56 | - VIEWPATH |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 57 | - CI_VERSION |
| 58 | - FILE_READ_MODE |
| 59 | - FILE_WRITE_MODE |
| 60 | - DIR_READ_MODE |
| 61 | - DIR_WRITE_MODE |
| 62 | - FOPEN_READ |
| 63 | - FOPEN_READ_WRITE |
| 64 | - FOPEN_WRITE_CREATE_DESTRUCTIVE |
| 65 | - FOPEN_READ_WRITE_CREATE_DESTRUCTIVE |
| 66 | - FOPEN_WRITE_CREATE |
| 67 | - FOPEN_READ_WRITE_CREATE |
| 68 | - FOPEN_WRITE_CREATE_STRICT |
Andrey Andreev | 16a704c | 2012-11-09 17:25:00 +0200 | [diff] [blame] | 69 | - FOPEN_READ_WRITE_CREATE_STRICT |