mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00
27 lines
468 B
PHP
27 lines
468 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Auth\Config;
|
|
|
|
use Config\Services as BaseService;
|
|
use Modules\Auth\Auth;
|
|
|
|
class Services extends BaseService
|
|
{
|
|
/**
|
|
* The base auth class
|
|
*/
|
|
public static function auth(bool $getShared = true): Auth
|
|
{
|
|
if ($getShared) {
|
|
/** @var Auth */
|
|
return self::getSharedInstance('auth');
|
|
}
|
|
|
|
$config = config('Auth');
|
|
|
|
return new Auth($config);
|
|
}
|
|
}
|