mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
update plugin docs and add some helper functions
This commit is contained in:
@@ -397,3 +397,11 @@ public function testRoute(HttpRequestEvent $event)
|
||||
$socket = ws_socket();
|
||||
$socket->send('hello world', $event->getFd()); // 客户端的连接 fd 编号可以通过 WebSocketOpenEvent 等事件获取
|
||||
```
|
||||
|
||||
### zm_create_app()
|
||||
|
||||
创建一个炸毛框架的单文件应用(仅单文件,项目外非编写插件模式时可用),效果等同于 `new \ZM\ZMApplication()`。
|
||||
|
||||
### zm_create_plugin()
|
||||
|
||||
创建一个炸毛单文件模式的插件对象,效果等同于 `new \ZM\Plugin\ZMPlugin()`。
|
||||
|
||||
Reference in New Issue
Block a user