forked from sysPass/plugin-Authenticator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.php
20 lines (16 loc) · 865 Bytes
/
base.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$lib = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'lib';
$base = [
'namespace' => 'SP\Modules\\Web\\Plugins\\Authenticator\\',
'dir' => $lib
];
if (!class_exists(\SP\Modules\Web\Plugins\Authenticator\Plugin::class)) {
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require APP_ROOT . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
$loader->addPsr4($base['namespace'], $base['dir']);
$loader->addClassMap([
\SP\Modules\Web\Controllers\AuthenticatorController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorController.php',
\SP\Modules\Web\Controllers\AuthenticatorLoginController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorLoginController.php'
]);
}
return $base;