Manager.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: yunwuxin <448901948@qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace think\swoole;
  12. use think\swoole\concerns\InteractsWithHttp;
  13. use think\swoole\concerns\InteractsWithPools;
  14. use think\swoole\concerns\InteractsWithQueue;
  15. use think\swoole\concerns\InteractsWithRpcClient;
  16. use think\swoole\concerns\InteractsWithRpcServer;
  17. use think\swoole\concerns\InteractsWithServer;
  18. use think\swoole\concerns\InteractsWithSwooleTable;
  19. use think\swoole\concerns\WithApplication;
  20. use think\swoole\concerns\WithContainer;
  21. /**
  22. * Class Manager
  23. */
  24. class Manager
  25. {
  26. use InteractsWithServer,
  27. InteractsWithSwooleTable,
  28. InteractsWithHttp,
  29. InteractsWithPools,
  30. InteractsWithRpcClient,
  31. InteractsWithRpcServer,
  32. InteractsWithQueue,
  33. WithContainer,
  34. WithApplication;
  35. /**
  36. * Initialize.
  37. */
  38. protected function initialize(): void
  39. {
  40. $this->prepareTables();
  41. $this->preparePools();
  42. $this->prepareHttp();
  43. $this->prepareRpcServer();
  44. $this->prepareQueue();
  45. $this->prepareRpcClient();
  46. }
  47. }