選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Autoload.php 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace Config;
  3. use CodeIgniter\Config\AutoloadConfig;
  4. /**
  5. * -------------------------------------------------------------------
  6. * AUTOLOADER CONFIGURATION
  7. * -------------------------------------------------------------------
  8. *
  9. * This file defines the namespaces and class maps so the Autoloader
  10. * can find the files as needed.
  11. *
  12. * NOTE: If you use an identical key in $psr4 or $classmap, then
  13. * the values in this file will overwrite the framework's values.
  14. */
  15. class Autoload extends AutoloadConfig
  16. {
  17. /**
  18. * -------------------------------------------------------------------
  19. * Namespaces
  20. * -------------------------------------------------------------------
  21. * This maps the locations of any namespaces in your application to
  22. * their location on the file system. These are used by the autoloader
  23. * to locate files the first time they have been instantiated.
  24. *
  25. * The '/app' and '/system' directories are already mapped for you.
  26. * you may change the name of the 'App' namespace if you wish,
  27. * but this should be done prior to creating any namespaced classes,
  28. * else you will need to modify all of those classes for this to work.
  29. *
  30. * Prototype:
  31. *```
  32. * $psr4 = [
  33. * 'CodeIgniter' => SYSTEMPATH,
  34. * 'App' => APPPATH
  35. * ];
  36. *```
  37. *
  38. * @var array<string, string>
  39. */
  40. public $psr4 = [
  41. APP_NAMESPACE => APPPATH, // For custom app namespace
  42. 'Config' => APPPATH . 'Config',
  43. ];
  44. /**
  45. * -------------------------------------------------------------------
  46. * Class Map
  47. * -------------------------------------------------------------------
  48. * The class map provides a map of class names and their exact
  49. * location on the drive. Classes loaded in this manner will have
  50. * slightly faster performance because they will not have to be
  51. * searched for within one or more directories as they would if they
  52. * were being autoloaded through a namespace.
  53. *
  54. * Prototype:
  55. *```
  56. * $classmap = [
  57. * 'MyClass' => '/path/to/class/file.php'
  58. * ];
  59. *```
  60. *
  61. * @var array<string, string>
  62. */
  63. public $classmap = [];
  64. /**
  65. * -------------------------------------------------------------------
  66. * Files
  67. * -------------------------------------------------------------------
  68. * The files array provides a list of paths to __non-class__ files
  69. * that will be autoloaded. This can be useful for bootstrap operations
  70. * or for loading functions.
  71. *
  72. * Prototype:
  73. * ```
  74. * $files = [
  75. * '/path/to/my/file.php',
  76. * ];
  77. * ```
  78. *
  79. * @var array<int, string>
  80. */
  81. public $files = [];
  82. }