pbergman/ntfy-bundle
最新稳定版本:1.0.2
Composer 安装命令:
composer require pbergman/ntfy-bundle
包简介
Symfony bundle for ntfy support
README 文档
README
A symfony bundle that makes it easy to manage multiple nfty servers and topics.
When creating services from the config and autowire is enabled there will parameter binds registered for the server and every topic which can be used arguments.
So for example we have the following config:
framework: http_client: scoped_clients: example.client: base_uri: 'https://ntfy.sh' auth_bearer: 'XXXXXXXXXXXXX' p_bergman_ntfy: servers: example: client: example.client topics: - foo - bar
the following binds will be registered:
PBergman\\Bundle\\NtfyBundle\\Api\\StaticTopicClient $exampleFooNtfyClient
PBergman\\Bundle\\NtfyBundle\\Api\\StaticTopicClient $exampleBarNtfyClient
PBergman\\Ntfy\\Api\\Client $exampleNtfyClient
And can be used for example if a controller want to publish on foo a message:
public function indexController(Request $request, StaticTopicClient $exampleFooNtfyClient) :Response
{
$exampleFooNtfyClient->publish(null, 'hello');
Use the
php bin/console config:dump-reference p_bergman_ntfy
Command to see latest configuration options.
统计信息
- 总下载量: 255
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-10-08