YarController.class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. namespace Think\Controller;
  12. /**
  13. * ThinkPHP Yar控制器类
  14. */
  15. class YarController {
  16. /**
  17. * 架构函数
  18. * @access public
  19. */
  20. public function __construct() {
  21. //控制器初始化
  22. if(method_exists($this,'_initialize'))
  23. $this->_initialize();
  24. //判断扩展是否存在
  25. if(!extension_loaded('yar'))
  26. E(L('_NOT_SUPPORT_').':yar');
  27. //实例化Yar_Server
  28. $server = new \Yar_Server($this);
  29. // 启动server
  30. $server->handle();
  31. }
  32. /**
  33. * 魔术方法 有不存在的操作的时候执行
  34. * @access public
  35. * @param string $method 方法名
  36. * @param array $args 参数
  37. * @return mixed
  38. */
  39. public function __call($method,$args){}
  40. }