Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PermeatorCore

Hierarchy

  • PermeatorCore

Index

Constructors

constructor

Properties

_config

_config: any

_globalData

_globalData: any = null

_interfaceList

_interfaceList: any[] = []

_name

_name: string = "unnamed PermeatorCore"

_platformInNow

_platformInNow: any = null

_platformsAllSupport

_platformsAllSupport: any[] = []

_platformsLoaded

_platformsLoaded: any = null

_rollBack

_rollBack: Function

rollBack

rollBack: Function

Methods

$interface

  • $interface(arr: Array<string>): this
  • 声明通用方法

    interface 接口, 传入字符串数组, 字符串为方法名, 表示 sm 将继承各平台的该方法

    • 在 $use 各平台 extends / permeator 中声明的方法, 在其他平台中使用可能会因没有此方法导致报错
    • 在 $interface 中声明后, 如果该平台没有实现该方法, 仅在控制台中显示警告

    Parameters

    • arr: Array<string>

      显示声明的方法列表

    Returns this

$setRollBack

  • $setRollBack(platform: Platform): this
  • 设置回滚平台

    Parameters

    • platform: Platform

      PermeatorCore 插件

    Returns this

$use

  • $use(platform: Platform): this
  • 加载平台插件

    use 使用, 传入对象, 用于方便扩展平台

    Parameters

    • platform: Platform

      PermeatorCore 插件

    Returns this

getEnv

  • getEnv(_callback: Function): Promise<any>
  • Parameters

    • _callback: Function

    Returns Promise<any>

ready

  • ready(callback: Function): Promise<any>
  • 环境初始完成方法

    callback

    callback

    Parameters

    • callback: Function

    Returns Promise<any>

Generated using TypeDoc