Exemplo n.º 1
0
 /**
  * 获取实例的方法
  * @return $this
  */
 public static function get_instance()
 {
     if (is_null(self::$_instance)) {
         $class = __CLASS__;
         self::$_instance = new $class();
     }
     return self::$_instance;
 }
Exemplo n.º 2
0
 /**
  * @param int $flow_id
  * @return array
  */
 private static function _get_fields_by_flow_id($flow_id)
 {
     $flow = new Module_FlowManager_Flow();
     $flow->id = $flow_id;
     $flow_info = $flow->get();
     if (!$flow_info) {
         return Lib_Helper::get_err_struct(Const_Err_DataAccess::ERR_FLOW_NOT_EXISTS, 'no this flow, flow_id: ' . $flow_id);
     }
     $fields = Module_ModuleManager_InterfaceGen::get_instance()->gen_fields($flow);
     return Lib_Helper::get_return_struct($fields);
 }