2023-12-19 02:28:16 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Akeeba Engine
|
|
|
|
*
|
|
|
|
* @package akeebaengine
|
2024-03-20 03:03:34 +00:00
|
|
|
* @copyright Copyright (c)2006-2024 Nicholas K. Dionysopoulos / Akeeba Ltd
|
2023-12-19 02:28:16 +00:00
|
|
|
* @license GNU General Public License version 3, or later
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Automatic aliasing of the old namespace to the new, as you use each old class.
|
|
|
|
*/
|
|
|
|
spl_autoload_register(
|
|
|
|
static function (string $className)
|
|
|
|
{
|
|
|
|
$oldNS = 'Akeeba\Engine\Postproc\Connector\S3v4';
|
|
|
|
$newNS = 'Akeeba\S3';
|
|
|
|
|
|
|
|
$className = trim($className, '\\');
|
|
|
|
|
|
|
|
if (strpos($className, $oldNS) !== 0)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$newClassName = $newNS . '\\' . trim(substr($className, strlen($oldNS)), '\\');
|
|
|
|
|
|
|
|
if (class_exists($newClassName, true))
|
|
|
|
{
|
|
|
|
class_alias($newClassName, $className, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
);
|