Autoload.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. * NOTE: This class is required prior to Autoloader instantiation,
  16. * and does not extend BaseConfig.
  17. */
  18. class Autoload extends AutoloadConfig
  19. {
  20. /**
  21. * -------------------------------------------------------------------
  22. * Namespaces
  23. * -------------------------------------------------------------------
  24. * This maps the locations of any namespaces in your application to
  25. * their location on the file system. These are used by the autoloader
  26. * to locate files the first time they have been instantiated.
  27. *
  28. * The 'Config' (APPPATH . 'Config') and 'CodeIgniter' (SYSTEMPATH) are
  29. * already mapped for you.
  30. *
  31. * You may change the name of the 'App' namespace if you wish,
  32. * but this should be done prior to creating any namespaced classes,
  33. * else you will need to modify all of those classes for this to work.
  34. *
  35. * @var array<string, list<string>|string>
  36. */
  37. public $psr4 = [
  38. APP_NAMESPACE => APPPATH,
  39. ];
  40. /**
  41. * -------------------------------------------------------------------
  42. * Class Map
  43. * -------------------------------------------------------------------
  44. * The class map provides a map of class names and their exact
  45. * location on the drive. Classes loaded in this manner will have
  46. * slightly faster performance because they will not have to be
  47. * searched for within one or more directories as they would if they
  48. * were being autoloaded through a namespace.
  49. *
  50. * Prototype:
  51. * $classmap = [
  52. * 'MyClass' => '/path/to/class/file.php'
  53. * ];
  54. *
  55. * @var array<string, string>
  56. */
  57. public $classmap = [];
  58. /**
  59. * -------------------------------------------------------------------
  60. * Files
  61. * -------------------------------------------------------------------
  62. * The files array provides a list of paths to __non-class__ files
  63. * that will be autoloaded. This can be useful for bootstrap operations
  64. * or for loading functions.
  65. *
  66. * Prototype:
  67. * $files = [
  68. * '/path/to/my/file.php',
  69. * ];
  70. *
  71. * @var list<string>
  72. */
  73. public $files = [];
  74. /**
  75. * -------------------------------------------------------------------
  76. * Helpers
  77. * -------------------------------------------------------------------
  78. * Prototype:
  79. * $helpers = [
  80. * 'form',
  81. * ];
  82. *
  83. * @var list<string>
  84. */
  85. public $helpers = [];
  86. }