pbergman/ntfy-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pbergman/ntfy-bundle

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.

统计信息

  • 总下载量: 287
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固