Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NonComposerComponentRegistration.php
Go to the documentation of this file.
1 <?php
7 //Register components (via a list of glob patterns)
9 
10 use RuntimeException;
11 
18 function main()
19 {
20  $globPatterns = require __DIR__ . '/registration_globlist.php';
21  $baseDir = dirname(dirname(__DIR__)) . '/';
22 
23  foreach ($globPatterns as $globPattern) {
24  // Sorting is disabled intentionally for performance improvement
25  $files = glob($baseDir . $globPattern, GLOB_NOSORT);
26  if ($files === false) {
27  throw new RuntimeException("glob(): error with '$baseDir$globPattern'");
28  }
29  array_map(function ($file) { require_once $file; }, $files);
30  }
31 }
32 
33 main();
$baseDir
Definition: autoload.php:9
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
foreach($appDirs as $dir) $files