- Implemented OrdersRepository for handling order data with pagination, filtering, and sorting capabilities. - Added methods for retrieving order status options, quick stats, and detailed order information. - Created OrderStatusRepository for managing order status groups and statuses, including CRUD operations and sorting. - Introduced a bootstrap file for test environment setup and autoloading.
29 lines
759 B
PHP
29 lines
759 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
$basePath = dirname(__DIR__);
|
|
$autoload = $basePath . '/vendor/autoload.php';
|
|
|
|
if (is_file($autoload)) {
|
|
require $autoload;
|
|
} else {
|
|
spl_autoload_register(static function (string $class) use ($basePath): void {
|
|
$prefixes = [
|
|
'App\\' => $basePath . '/src/',
|
|
'Tests\\' => $basePath . '/tests/',
|
|
];
|
|
|
|
foreach ($prefixes as $prefix => $directory) {
|
|
if (!str_starts_with($class, $prefix)) {
|
|
continue;
|
|
}
|
|
|
|
$relative = substr($class, strlen($prefix));
|
|
$file = $directory . str_replace('\\', '/', $relative) . '.php';
|
|
if (is_file($file)) {
|
|
require $file;
|
|
}
|
|
}
|
|
});
|
|
}
|