. * */ namespace Vvveb\Plugins\TwoFactorAuth\Controller; use Vvveb\Controller\User\Base as BaseCommon; class Base extends BaseCommon { protected function init2fa($siteName = 'Vvveb') { // in practice you would require the composer loader if it was not already part of your framework or project spl_autoload_register(function ($className) { include_once str_replace(['RobThree\\Auth', '\\'], [__DIR__ . '/../../system/lib', '/'], $className) . '.php'; }); // substitute your company or app name here $tfa = new \RobThree\Auth\TwoFactorAuth(new \RobThree\Auth\Providers\Qr\QRServerProvider(), $siteName); return $tfa; } }