-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbootstrap.php
More file actions
27 lines (22 loc) · 639 Bytes
/
bootstrap.php
File metadata and controls
27 lines (22 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
declare(strict_types=1);
use Retrofit\Drupal\Provider;
$GLOBALS['conf']['container_service_providers']['retrofit'] = Provider::class;
spl_autoload_register(function (string $item) {
if (!\Drupal::hasContainer()) {
return null;
}
static $files;
if ($files === null) {
if (!\Drupal::getContainer()->hasParameter('files_autoload_registry')) {
$files = [];
} else {
$files = \Drupal::getContainer()->getParameter('files_autoload_registry');
}
}
if (isset($files[$item])) {
include $files[$item];
return true;
}
return null;
});