mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
update api docs
This commit is contained in:
@@ -254,7 +254,7 @@ public function share(string $url, string $title, null|string $content, null|str
|
|||||||
## contact
|
## contact
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function contact(string $type, int|string $id): string
|
public function contact(int|string $type, int|string $id): string
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
@@ -265,7 +265,7 @@ public function contact(string $type, int|string $id): string
|
|||||||
|
|
||||||
| 名称 | 类型 | 描述 |
|
| 名称 | 类型 | 描述 |
|
||||||
| -------- | ---- | ----------- |
|
| -------- | ---- | ----------- |
|
||||||
| type | string | 名片类型 |
|
| type | int|string | 名片类型 |
|
||||||
| id | int|string | 好友或群ID |
|
| id | int|string | 好友或群ID |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
@@ -455,7 +455,7 @@ public function _custom(string $type_name, array $params): string
|
|||||||
## decode
|
## decode
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function decode(string $msg, bool $is_content): string
|
public function decode(int|string|Stringable $msg, bool $is_content): string
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
@@ -466,7 +466,7 @@ public function decode(string $msg, bool $is_content): string
|
|||||||
|
|
||||||
| 名称 | 类型 | 描述 |
|
| 名称 | 类型 | 描述 |
|
||||||
| -------- | ---- | ----------- |
|
| -------- | ---- | ----------- |
|
||||||
| msg | string | 字符串 |
|
| msg | int|string|Stringable | 字符串 |
|
||||||
| is_content | bool | 如果是解码CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
| is_content | bool | 如果是解码CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
@@ -479,7 +479,7 @@ public function decode(string $msg, bool $is_content): string
|
|||||||
## replace
|
## replace
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function replace(string $str): string
|
public function replace(int|string|Stringable $str): string
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
@@ -490,7 +490,7 @@ public function replace(string $str): string
|
|||||||
|
|
||||||
| 名称 | 类型 | 描述 |
|
| 名称 | 类型 | 描述 |
|
||||||
| -------- | ---- | ----------- |
|
| -------- | ---- | ----------- |
|
||||||
| str | string | 字符串 |
|
| str | int|string|Stringable | 字符串 |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
|
|
||||||
@@ -502,7 +502,7 @@ public function replace(string $str): string
|
|||||||
## escape
|
## escape
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function escape(string $msg, bool $is_content): string
|
public function escape(int|string|Stringable $msg, bool $is_content): string
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
@@ -513,7 +513,7 @@ public function escape(string $msg, bool $is_content): string
|
|||||||
|
|
||||||
| 名称 | 类型 | 描述 |
|
| 名称 | 类型 | 描述 |
|
||||||
| -------- | ---- | ----------- |
|
| -------- | ---- | ----------- |
|
||||||
| msg | string | 字符串 |
|
| msg | int|string|Stringable | 字符串 |
|
||||||
| is_content | bool | 如果是转义CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
| is_content | bool | 如果是转义CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
@@ -526,7 +526,7 @@ public function escape(string $msg, bool $is_content): string
|
|||||||
## encode
|
## encode
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function encode(string $msg, bool $is_content): string
|
public function encode(int|string|Stringable $msg, bool $is_content): string
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
@@ -537,7 +537,7 @@ public function encode(string $msg, bool $is_content): string
|
|||||||
|
|
||||||
| 名称 | 类型 | 描述 |
|
| 名称 | 类型 | 描述 |
|
||||||
| -------- | ---- | ----------- |
|
| -------- | ---- | ----------- |
|
||||||
| msg | string | 字符串 |
|
| msg | int|string|Stringable | 字符串 |
|
||||||
| is_content | bool | 如果是转义CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
| is_content | bool | 如果是转义CQ码本体内容,则为false(默认),如果是参数内的字符串,则为true |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
|
|||||||
@@ -1,17 +1,57 @@
|
|||||||
# ZM\Module\ModuleBase
|
# ZM\Module\ModuleBase
|
||||||
|
|
||||||
## getModuleName
|
## __construct
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function getModuleName(): mixed
|
public function __construct(string $module_name): mixed
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
|
|
||||||
作者很懒,什么也没有说
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| module_name | string | 模块名称 |
|
||||||
|
|
||||||
### 返回
|
### 返回
|
||||||
|
|
||||||
| 类型 | 描述 |
|
| 类型 | 描述 |
|
||||||
| ---- | ----------- |
|
| ---- | ----------- |
|
||||||
| mixed | |
|
| mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## getModuleName
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function getModuleName(): string
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
获取模块名称
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| string | |
|
||||||
|
|
||||||
|
|
||||||
|
## getEvents
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function getEvents(): array
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
获取事件列表
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| array | |
|
||||||
|
|||||||
@@ -1,9 +1,55 @@
|
|||||||
# ZM\ZMServer
|
# ZM\ZMServer
|
||||||
|
|
||||||
## getAppName
|
## __construct
|
||||||
|
|
||||||
```php
|
```php
|
||||||
public function getAppName(): mixed
|
public function __construct(string $app_name): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| app_name | string | App名称 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## addModule
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function addModule(mixed $module_class): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| module_class | mixed | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## run
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function run(): mixed
|
||||||
```
|
```
|
||||||
|
|
||||||
### 描述
|
### 描述
|
||||||
|
|||||||
Reference in New Issue
Block a user