Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Static Public Member Functions
Populator Class Reference

Static Public Member Functions

static populateMappings (AutoloaderInterface $autoloader, DirectoryList $dirList)
 

Detailed Description

Utility class for populating an autoloader with application-specific information for PSR-0 and PSR-4 mappings and include-path contents

Definition at line 15 of file Populator.php.

Member Function Documentation

◆ populateMappings()

static populateMappings ( AutoloaderInterface  $autoloader,
DirectoryList  $dirList 
)
static
Parameters
AutoloaderInterface$autoloader
DirectoryList$dirList
Returns
void

Required for code generation to occur

Required to autoload custom classes

Definition at line 22 of file Populator.php.

23  {
24  $generationDir = $dirList->getPath(DirectoryList::GENERATED_CODE);
25 
26  $autoloader->addPsr4('Magento\\', [$generationDir . '/Magento/'], true);
27 
29  FileResolver::addIncludePath($generationDir);
30 
32  $autoloader->addPsr0('', [$generationDir]);
33  }
if(!file_exists($installConfigFile)) $dirList
Definition: bootstrap.php:57
static addIncludePath($path, $prepend=true)

The documentation for this class was generated from the following file: