Base.php 484 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\common\facade;
  3. use app\common\exception\BusinessException;
  4. /**
  5. * @see RedisManager
  6. *
  7. */
  8. class Base
  9. {
  10. public static function getFacadeClass()
  11. {
  12. throw new BusinessException('facade 初始化失败');
  13. }
  14. public static function instance()
  15. {
  16. return static::getFacadeClass();
  17. }
  18. public static function __callStatic($funcname, $arguments)
  19. {
  20. return static::instance()->{$funcname}(...$arguments);
  21. }
  22. }