Menu

## Autoload extends AutoloadConfig
in package

Autoload.php : 21

------------------------------------------------------------------- AUTOLOADER CONFIGURATION -------------------------------------------------------------------

This file defines the namespaces and class maps so the Autoloader can find the files as needed.

NOTE: If you use an identical key in $psr4 or $classmap, then the values in this file will overwrite the framework's values.

NOTE: This class is required prior to Autoloader instantiation, and does not extend BaseConfig.

### Table of Contents

#### Properties

$classmap : array<string, string>
  ------------------------------------------------------------------- Class Map ------------------------------------------------------------------- The class map provides a map of class names and their exact location on the drive. Classes loaded in this manner will have slightly faster performance because they will not have to be searched for within one or more directories as they would if they were being autoloaded through a namespace.
$files : array<int, string>
  ------------------------------------------------------------------- Files ------------------------------------------------------------------- The files array provides a list of paths to __non-class__ files that will be autoloaded. This can be useful for bootstrap operations or for loading functions.
$helpers : array<int, string>
  ------------------------------------------------------------------- Helpers ------------------------------------------------------------------- Prototype: $helpers = [ 'form', ];
$psr4 : array<string, array<int, string>|string>
  ------------------------------------------------------------------- Namespaces ------------------------------------------------------------------- This maps the locations of any namespaces in your application to their location on the file system. These are used by the autoloader to locate files the first time they have been instantiated.

### Properties

#### $classmap

Autoload.php : 61

------------------------------------------------------------------- Class Map ------------------------------------------------------------------- The class map provides a map of class names and their exact location on the drive. Classes loaded in this manner will have slightly faster performance because they will not have to be searched for within one or more directories as they would if they were being autoloaded through a namespace.

`public array<string, string> $classmap = []`

Prototype: $classmap = [ 'MyClass' => '/path/to/class/file.php' ];

#### $files

Autoload.php : 78

------------------------------------------------------------------- Files ------------------------------------------------------------------- The files array provides a list of paths to __non-class__ files that will be autoloaded. This can be useful for bootstrap operations or for loading functions.

`public array<int, string> $files = []`

Prototype: $files = [ '/path/to/my/file.php', ];

#### $helpers

Autoload.php : 91

------------------------------------------------------------------- Helpers ------------------------------------------------------------------- Prototype: $helpers = [ 'form', ];

`public array<int, string> $helpers = []`

#### $psr4

Autoload.php : 40

------------------------------------------------------------------- Namespaces ------------------------------------------------------------------- This maps the locations of any namespaces in your application to their location on the file system. These are used by the autoloader to locate files the first time they have been instantiated.

`public array<string, array<int, string>|string> $psr4 = [APP_NAMESPACE => APPPATH]`

The 'Config' (APPPATH . 'Config') and 'CodeIgniter' (SYSTEMPATH) are already mapped for you.

You may change the name of the 'App' namespace if you wish, but this should be done prior to creating any namespaced classes, else you will need to modify all of those classes for this to work.

## Search results