You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
601 B
PHP
34 lines
601 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use App\Services\Auth\Cookie;
|
|
use App\Services\Auth\Redis;
|
|
use App\Services\Auth\JwtToken;
|
|
|
|
class Factory
|
|
{
|
|
public static function createAuth()
|
|
{
|
|
$method = Config::get('authDriver');
|
|
switch ($method) {
|
|
case 'cookie':
|
|
return new Cookie();
|
|
case 'redis':
|
|
return new Redis();
|
|
case 'jwt':
|
|
return new JwtToken();
|
|
}
|
|
return new Redis();
|
|
}
|
|
|
|
public static function createCache()
|
|
{
|
|
}
|
|
|
|
public static function createMail()
|
|
{
|
|
}
|
|
|
|
}
|