* @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(); } }