Files
zhamao-framework/assets/js/31.5c4bb546.js
2024-09-19 08:29:13 +00:00

1 line
8.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{742:function(t,e,o){"use strict";o.r(e);var d=o(84),v=Object(d.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"类全局别名"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#类全局别名"}},[t._v("#")]),t._v(" 类全局别名")]),t._v(" "),e("p",[t._v("在框架 1.x 和 2.x 老版本中,我们发现许多开发者在使用框架时,往往不会使用 PhpStorm 这类大型 IDE而即使使用 VSCode 这类编辑器的时候也不一定会安装补全插件,\n这样在编写机器人模块或插件时会因寻找每个对象的完整命名空间而烦恼。")]),t._v(" "),e("p",[t._v("在 3.0 版本起,框架对常用的注解事件和对象均使用了类别名功能,方便非 IDE 开发者编写插件。")]),t._v(" "),e("h2",{attrs:{id:"别名使用"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#别名使用"}},[t._v("#")]),t._v(" 别名使用")]),t._v(" "),e("p",[t._v("框架对别名的定义比较简单,由于内部暂时没有不同命名空间下重复类名的情况,所以我们目前只对需要别名类名的命名空间移除,例如:")]),t._v(" "),e("p",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\BotCommand")]),t._v(" 注解事件类,在经过全局别名后,你也可以使用 "),e("code",[t._v("\\BotCommand")]),t._v(" 作为注解事件,效果相同。")]),t._v(" "),e("h2",{attrs:{id:"别名列表"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#别名列表"}},[t._v("#")]),t._v(" 别名列表")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("全类名")]),t._v(" "),e("th",[t._v("别名")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Framework\\BindEvent")])]),t._v(" "),e("td",[e("code",[t._v("BindEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Framework\\Cron")])]),t._v(" "),e("td",[e("code",[t._v("Cron")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Framework\\Init")])]),t._v(" "),e("td",[e("code",[t._v("Init")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Framework\\Setup")])]),t._v(" "),e("td",[e("code",[t._v("Setup")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Framework\\Tick")])]),t._v(" "),e("td",[e("code",[t._v("Tick")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Http\\Controller")])]),t._v(" "),e("td",[e("code",[t._v("Controller")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Http\\Route")])]),t._v(" "),e("td",[e("code",[t._v("Route")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Middleware\\Middleware")])]),t._v(" "),e("td",[e("code",[t._v("Middleware")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\BotAction")])]),t._v(" "),e("td",[e("code",[t._v("BotAction")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\BotActionResponse")])]),t._v(" "),e("td",[e("code",[t._v("BotActionResponse")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\BotCommand")])]),t._v(" "),e("td",[e("code",[t._v("BotCommand")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\BotEvent")])]),t._v(" "),e("td",[e("code",[t._v("BotEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\CommandArgument")])]),t._v(" "),e("td",[e("code",[t._v("CommandArgument")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\OneBot\\CommandHelp")])]),t._v(" "),e("td",[e("code",[t._v("CommandHelp")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Annotation\\Closed")])]),t._v(" "),e("td",[e("code",[t._v("Closed")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\MiddlewareArgTrait")])]),t._v(" "),e("td",[e("code",[t._v("MiddlewareArgTrait")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\MiddlewareHandler")])]),t._v(" "),e("td",[e("code",[t._v("MiddlewareHandler")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\NeedAnnotationTrait")])]),t._v(" "),e("td",[e("code",[t._v("NeedAnnotationTrait")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\Pipeline")])]),t._v(" "),e("td",[e("code",[t._v("Pipeline")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\TimerMiddleware")])]),t._v(" "),e("td",[e("code",[t._v("TimerMiddleware")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Middleware\\WebSocketFilter")])]),t._v(" "),e("td",[e("code",[t._v("WebSocketFilter")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Plugin\\ZMPlugin")])]),t._v(" "),e("td",[e("code",[t._v("ZMPlugin")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Context\\BotContext")])]),t._v(" "),e("td",[e("code",[t._v("BotContext")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\CatCode")])]),t._v(" "),e("td",[e("code",[t._v("CatCode")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\ConnectionUtil")])]),t._v(" "),e("td",[e("code",[t._v("ConnectionUtil")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\MessageUtil")])]),t._v(" "),e("td",[e("code",[t._v("MessageUtil")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\OneBot12FileDownloader")])]),t._v(" "),e("td",[e("code",[t._v("OneBot12FileDownloader")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\OneBot12FileUploader")])]),t._v(" "),e("td",[e("code",[t._v("OneBot12FileUploader")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\ZMRequest")])]),t._v(" "),e("td",[e("code",[t._v("ZMRequest")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Utils\\ZMUtil")])]),t._v(" "),e("td",[e("code",[t._v("ZMUtil")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Store\\KV\\LightCache")])]),t._v(" "),e("td",[e("code",[t._v("LightCache")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Store\\KV\\Redis\\KVRedis")])]),t._v(" "),e("td",[e("code",[t._v("KVRedis")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\ZM\\Config\\ZMConfig")])]),t._v(" "),e("td",[e("code",[t._v("ZMConfig")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\Driver\\Event\\WebSocket\\WebSocketOpenEvent")])]),t._v(" "),e("td",[e("code",[t._v("WebSocketOpenEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\Driver\\Event\\WebSocket\\WebSocketCloseEvent")])]),t._v(" "),e("td",[e("code",[t._v("WebSocketCloseEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\Driver\\Event\\WebSocket\\WebSocketMessageEvent")])]),t._v(" "),e("td",[e("code",[t._v("WebSocketMessageEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\Driver\\Event\\Http\\HttpRequestEvent")])]),t._v(" "),e("td",[e("code",[t._v("HttpRequestEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\V12\\Object\\OneBotEvent")])]),t._v(" "),e("td",[e("code",[t._v("OneBotEvent")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\OneBot\\V12\\Object\\Action")])]),t._v(" "),e("td",[e("code",[t._v("Action")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Choir\\Http\\HttpFactory")])]),t._v(" "),e("td",[e("code",[t._v("HttpFactory")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Choir\\WebSocket\\FrameInterface")])]),t._v(" "),e("td",[e("code",[t._v("FrameInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Http\\Message\\ServerRequestInterface")])]),t._v(" "),e("td",[e("code",[t._v("ServerRequestInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Http\\Message\\RequestInterface")])]),t._v(" "),e("td",[e("code",[t._v("RequestInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Http\\Message\\ResponseInterface")])]),t._v(" "),e("td",[e("code",[t._v("ResponseInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Http\\Message\\UriInterface")])]),t._v(" "),e("td",[e("code",[t._v("UriInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Log\\LoggerInterface")])]),t._v(" "),e("td",[e("code",[t._v("LoggerInterface")])])]),t._v(" "),e("tr",[e("td",[e("code",[t._v("\\Psr\\Container\\ContainerInterface")])]),t._v(" "),e("td",[e("code",[t._v("ContainerInterface")])])])])])])}),[],!1,null,null,null);e.default=v.exports}}]);