CodeIgniter v4.5 API

AutoloadConfig
in package

AUTOLOADER CONFIGURATION

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

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.
$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.
$coreClassmap  : array<class-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.
$coreFiles  : array<int, string>
------------------------------------------------------------------- Core Files ------------------------------------------------------------------- List of files from the framework to be autoloaded early.
$corePsr4  : array<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.

Methods

__construct()  : mixed
Constructor.

Properties

$classmap

------------------------------------------------------------------- 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 = []

$files

------------------------------------------------------------------- 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 = []

$psr4

------------------------------------------------------------------- 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 = []

The '/app' and '/system' directories 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.

$coreClassmap

------------------------------------------------------------------- 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.

protected array<class-string, string> $coreClassmap = [\Psr\Log\AbstractLogger::class => SYSTEMPATH . 'ThirdParty/PSR/Log/AbstractLogger.php', \Psr\Log\InvalidArgumentException::class => SYSTEMPATH . 'ThirdParty/PSR/Log/InvalidArgumentException.php', \Psr\Log\LoggerAwareInterface::class => SYSTEMPATH . 'ThirdParty/PSR/Log/LoggerAwareInterface.php', \Psr\Log\LoggerAwareTrait::class => SYSTEMPATH . 'ThirdParty/PSR/Log/LoggerAwareTrait.php', \Psr\Log\LoggerInterface::class => SYSTEMPATH . 'ThirdParty/PSR/Log/LoggerInterface.php', \Psr\Log\LoggerTrait::class => SYSTEMPATH . 'ThirdParty/PSR/Log/LoggerTrait.php', \Psr\Log\LogLevel::class => SYSTEMPATH . 'ThirdParty/PSR/Log/LogLevel.php', \Psr\Log\NullLogger::class => SYSTEMPATH . 'ThirdParty/PSR/Log/NullLogger.php', \Laminas\Escaper\Exception\ExceptionInterface::class => SYSTEMPATH . 'ThirdParty/Escaper/Exception/ExceptionInterface.php', \Laminas\Escaper\Exception\InvalidArgumentException::class => SYSTEMPATH . 'ThirdParty/Escaper/Exception/InvalidArgumentException.php', \Laminas\Escaper\Exception\RuntimeException::class => SYSTEMPATH . 'ThirdParty/Escaper/Exception/RuntimeException.php', \Laminas\Escaper\Escaper::class => SYSTEMPATH . 'ThirdParty/Escaper/Escaper.php']

$coreFiles

------------------------------------------------------------------- Core Files ------------------------------------------------------------------- List of files from the framework to be autoloaded early.

protected array<int, string> $coreFiles = []

$corePsr4

------------------------------------------------------------------- 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.

protected array<string, string> $corePsr4 = ['CodeIgniter' => SYSTEMPATH, 'Config' => APPPATH . 'Config']

Do not change the name of the CodeIgniter namespace or your application will break.

Methods

__construct()

Constructor.

public __construct() : mixed

Merge the built-in and developer-configured psr4 and classmap, with preference to the developer ones.


        
On this page

Search results