27 lines
533 B
PHP
27 lines
533 B
PHP
|
<?php
|
||
|
namespace App\Contract;
|
||
|
|
||
|
use App\Definition\Contract;
|
||
|
use App\Service\Auth as AuthService;
|
||
|
|
||
|
class Auth
|
||
|
{
|
||
|
use Contract;
|
||
|
|
||
|
protected static function newInstance()
|
||
|
{
|
||
|
return new AuthService();
|
||
|
}
|
||
|
public static function __callStatic($name, $params)
|
||
|
{
|
||
|
if (!method_exists(Response::class, $name)) {
|
||
|
$instance = self::getInstance();
|
||
|
if (method_exists($instance, $name)) {
|
||
|
return call_user_func_array([$instance, $name], $params);
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
return call_user_func_array([self, $name], $params);
|
||
|
}
|
||
|
}
|
||
|
?>
|