YarController.class.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 Yar控制器类
  19. */
  20. class YarController {
  21. /**
  22. * 架构函数
  23. * @access public
  24. */
  25. public function __construct() {
  26. //控制器初始化
  27. if(method_exists($this,'_initialize'))
  28. $this->_initialize();
  29. //判断扩展是否存在
  30. if(!extension_loaded('yar'))
  31. E(L('_NOT_SUPPORT_').':yar');
  32. //实例化Yar_Server
  33. $server = new \Yar_Server($this);
  34. // 启动server
  35. $server->handle();
  36. }
  37. /**
  38. * 魔术方法 有不存在的操作的时候执行
  39. * @access public
  40. * @param string $method 方法名
  41. * @param array $args 参数
  42. * @return mixed
  43. */
  44. public function __call($method,$args){}
  45. }