添加通知
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | common::add_notice |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 公共函数 |
功能说明
添加通知
调用示例
$param = ['type' => 'string', 'title' => '示例名称', 'content' => 'string', 'attachment' => ['string'], 'priority' => 1, 'rel_id' => 1];
$result = add_notice($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.type | string | 是 | — | required | 消息类型:idcsmart官方通知,system系统通知 |
param.title | string | 是 | — | required | 消息标题 |
param.content | string | 是 | — | required | 消息内容 |
param.attachment | array | 否 | — | — | 附件 |
param.priority | int | 否 | — | — | 优先级:0普通,1高 |
param.rel_id | int | 否 | — | — | 关联ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
返回值 | bool | — |
正常返回
{}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |