mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
18 lines
461 B
PHP
18 lines
461 B
PHP
|
<?php
|
||
|
|
||
|
// Init composer autoload
|
||
|
call_user_func(function () {
|
||
|
$candidates = [
|
||
|
__DIR__ . '/../../vendor/autoload.php',
|
||
|
__DIR__ . '/../../../vendor/autoload.php',
|
||
|
getcwd() . '/vendor/autoload.php',
|
||
|
];
|
||
|
foreach ($candidates as $candidate) {
|
||
|
if (file_exists($candidate)) {
|
||
|
require_once $candidate;
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
die("Failed to include composer's autoloader, unable to continue");
|
||
|
});
|