预装变量已封装在rp\Plugin中,可继承直接使用
| 变量/方法 | 调用 | 说明 |
|---|---|---|
| App | $this->App | 同主文件App |
| webConfig | $this->webConfig | 同webConfig配置 |
| Db | $this->Db | 同Db数据库 |
| Db_prefix | $this->Db_prefix | 数据库前缀 |
| pluginName | $this->pluginName | 当前插件名称 |
| pluginPath | $this->pluginPath | 当前插件相对路径(根目录) |
| tempUrl | $this->tempUrl | (V1.9.4新增)当前模板相对路径(根目录) |
| setConfig() | $this->setConfig($pluginName, array $data) | 配置保存 |
| getConfig() | $this->getConfig($pluginName) | 插件配置获取,pluginName为空或不传,则自动获取当前插件 |
| admin | $this->admin | 管理员数据,checkFormAdmin验证通过后方可使用 |