/** * @brief 构造函数,读取service的配置 * * @return * @retval * @see * @note * @author wiki * @date 2011/09/06 16:12:35 **/ public function __construct($service = MAIN_APP) { $this->service = $service; //读service的配置文件 $arrConf = Bd_Conf::getMyConf("service/app_" . strtolower($this->service)); $this->bolLocal = $arrConf['proxy'] === 'php' ? true : false; $this->defaultUrl = "/api/" . $this->service . "/data?fromapi=1"; $this->oe = null; //命名方式同saf }
private function getMethod($strMethod, $strApp, &$objDS, &$strFunc, &$arrParams, &$arrOutput) { $this->_conf = Bd_Conf::getMyConf("api"); if (isset($this->_conf[$strMethod])) { $arrConf = $this->_conf[$strMethod]; $strDSName = $arrConf['ds']; $strFunc = $arrConf['func']; $objDS = new $strDSName(); if (isset($arrConf['params'])) { $arrParams = $arrConf['params']; } else { $arrParams = null; } if (isset($arrConf['output'])) { $arrOutput = $arrConf['output']; } else { $arrOutput = null; } } else { Bd_Log::warning("{$strMethod} failed with no such methods in {$strApp}\\'s api.conf", self::METHOD_NOT_EXIST, $arrRequest); return self::METHOD_NOT_EXIST; } return self::SUCCESS; }