Exemplo n.º 1
0
 /**
  * 添加可用接口
  *
  * @param string $functionName
  * @param bool $isDebug
  * @return bool
  */
 protected function service_enable($functionName, $isDebug = FALSE)
 {
     if ($this->is_services_enable($functionName)) {
         return true;
     }
     $data = new BaseCallableFunctionData();
     $data->set_functionname($functionName);
     $data->set_isDebugFunction($isDebug);
     // 发行版测试函数不让调用
     if (!C(Constants::DEBUG, null, false) && $isDebug) {
         return true;
     }
     $this->service_list[$data->get_functionname()] = $data->toArray();
     return true;
 }