mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 17:31:25 +01:00
Fix import
This commit is contained in:
10
htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php
Normal file
10
htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
spl_autoload_register(function ($class_name) {
|
||||
$preg_match = preg_match('/^PhpOffice\\\PhpSpreadsheet\\\/', $class_name);
|
||||
|
||||
if (1 === $preg_match) {
|
||||
$class_name = preg_replace('/\\\/', '/', $class_name);
|
||||
$class_name = preg_replace('/^PhpOffice\\/PhpSpreadsheet\\//', '', $class_name);
|
||||
require_once __DIR__ . '/PhpSpreadsheet/' . $class_name . '.php';
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user