Fix import

This commit is contained in:
Laurent Destailleur
2021-04-08 17:49:13 +02:00
parent d098bf412d
commit 04536f9ec8
2 changed files with 16 additions and 11 deletions

View 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';
}
});