mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-11 11:48:40 +00:00
fix autoloading for modules
This commit is contained in:
parent
ec0bdc3c4b
commit
7322bf89d8
|
|
@ -1,13 +1,21 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
if (\is_file(__DIR__ . '/../../phpOMS/Autoloader.php')) {
|
||||
if (\is_file(__DIR__ . '/../../tests/Autoloader.php')) {
|
||||
require_once __DIR__ . '/../../tests/Autoloader.php';
|
||||
} elseif (\is_file(__DIR__ . '/../../phpOMS/Autoloader.php')) {
|
||||
require_once __DIR__ . '/../../phpOMS/Autoloader.php';
|
||||
} else {
|
||||
require_once __DIR__ . '/../../Autoloader.php';
|
||||
}
|
||||
|
||||
use phpOMS\Autoloader;
|
||||
use tests\Autoloader;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources');
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources/tcpdf');
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources/Stripe');
|
||||
if (\is_dir(__DIR__ . '/../../Karaka')) {
|
||||
Autoloader::addPath(__DIR__ . '/../../Karaka/Resources');
|
||||
Autoloader::addPath(__DIR__ . '/../../Karaka/Resources/tcpdf');
|
||||
Autoloader::addPath(__DIR__ . '/../../Karaka/Resources/Stripe');
|
||||
} else {
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources');
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources/tcpdf');
|
||||
Autoloader::addPath(__DIR__ . '/../../Resources/Stripe');
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user