JsonRpcController.class.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * 洛阳赤炎鹰网络科技有限公司
  4. * https://www.cyyvip.com
  5. * Copyright (c) 2022 赤店商城 All rights reserved.
  6. */
  7. // +----------------------------------------------------------------------
  8. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  9. // +----------------------------------------------------------------------
  10. // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
  11. // +----------------------------------------------------------------------
  12. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  13. // +----------------------------------------------------------------------
  14. // | Author: liu21st <liu21st@gmail.com>
  15. // +----------------------------------------------------------------------
  16. namespace Think\Controller;
  17. /**
  18. * ThinkPHP JsonRPC控制器类
  19. */
  20. class JsonRpcController {
  21. /**
  22. * 架构函数
  23. * @access public
  24. */
  25. public function __construct() {
  26. //控制器初始化
  27. if(method_exists($this,'_initialize'))
  28. $this->_initialize();
  29. //导入类库
  30. Vendor('jsonRPC.jsonRPCServer');
  31. // 启动server
  32. \jsonRPCServer::handle($this);
  33. }
  34. /**
  35. * 魔术方法 有不存在的操作的时候执行
  36. * @access public
  37. * @param string $method 方法名
  38. * @param array $args 参数
  39. * @return mixed
  40. */
  41. public function __call($method,$args){}
  42. }