You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Constants.php 3.8KB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /*
  3. | --------------------------------------------------------------------
  4. | App Namespace
  5. | --------------------------------------------------------------------
  6. |
  7. | This defines the default Namespace that is used throughout
  8. | CodeIgniter to refer to the Application directory. Change
  9. | this constant to change the namespace that all application
  10. | classes should use.
  11. |
  12. | NOTE: changing this will require manually modifying the
  13. | existing namespaces of App\* namespaced-classes.
  14. */
  15. defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
  16. /*
  17. | --------------------------------------------------------------------------
  18. | Composer Path
  19. | --------------------------------------------------------------------------
  20. |
  21. | The path that Composer's autoload file is expected to live. By default,
  22. | the vendor folder is in the Root directory, but you can customize that here.
  23. */
  24. defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Timing Constants
  28. |--------------------------------------------------------------------------
  29. |
  30. | Provide simple ways to work with the myriad of PHP functions that
  31. | require information to be in seconds.
  32. */
  33. defined('SECOND') || define('SECOND', 1);
  34. defined('MINUTE') || define('MINUTE', 60);
  35. defined('HOUR') || define('HOUR', 3600);
  36. defined('DAY') || define('DAY', 86400);
  37. defined('WEEK') || define('WEEK', 604800);
  38. defined('MONTH') || define('MONTH', 2_592_000);
  39. defined('YEAR') || define('YEAR', 31_536_000);
  40. defined('DECADE') || define('DECADE', 315_360_000);
  41. /*
  42. | --------------------------------------------------------------------------
  43. | Exit Status Codes
  44. | --------------------------------------------------------------------------
  45. |
  46. | Used to indicate the conditions under which the script is exit()ing.
  47. | While there is no universal standard for error codes, there are some
  48. | broad conventions. Three such conventions are mentioned below, for
  49. | those who wish to make use of them. The CodeIgniter defaults were
  50. | chosen for the least overlap with these conventions, while still
  51. | leaving room for others to be defined in future versions and user
  52. | applications.
  53. |
  54. | The three main conventions used for determining exit status codes
  55. | are as follows:
  56. |
  57. | Standard C/C++ Library (stdlibc):
  58. | http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
  59. | (This link also contains other GNU-specific conventions)
  60. | BSD sysexits.h:
  61. | http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
  62. | Bash scripting:
  63. | http://tldp.org/LDP/abs/html/exitcodes.html
  64. |
  65. */
  66. defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
  67. defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
  68. defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
  69. defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
  70. defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
  71. defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
  72. defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
  73. defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
  74. defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
  75. defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
  76. /**
  77. * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
  78. */
  79. define('EVENT_PRIORITY_LOW', 200);
  80. /**
  81. * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
  82. */
  83. define('EVENT_PRIORITY_NORMAL', 100);
  84. /**
  85. * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
  86. */
  87. define('EVENT_PRIORITY_HIGH', 10);