123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- /**
- * Oacallback.php UTF-8
- *
- *
- * @date : 2017/6/16 10:08
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : guxiannong <gxn@huosdk.com>
- * @version : HUOOA 1.0
- */
- namespace api\oa\controller;
- class OacallbackController extends OaController {
- function _initialize() {
- parent::_initialize();
- }
- /**
- * 检测func参数
- *
- * @return $this
- */
- public function checkFunc() {
- if (empty($this->param['func'])) {
- return $this->oa_class->hs_api_responce('409', 'func参数错误');
- }
- }
- public function index() {
- $this->checkFunc();
- if ($this->param['func'] == 'GM_FOSTER' || $this->param['func'] == 'GM_FIRST') {
- $this->param['func'] = 'OaFirstFoster';
- }
- self::init($this->param['func'].'Controller');
- }
- public static function init($payway) {
- $_class = false !== strpos($payway, '\\') ? $payway : '\\api\\oa\\controller\\'.ucwords($payway);
- // 记录初始化信息
- return new $_class();
- }
- }
|