proglab/space-transport-bundle

用于symfony Notifier的JetBrain Space传输

安装: 183

依赖者: 0

建议者: 0

安全性: 0

星级: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

v1.0.7 2022-06-29 11:23 UTC

This package is auto-updated.

Last update: 2024-09-29 05:57:11 UTC


README

一个用于symfony notifier的Jetbrains Space传输的symfony包。

安装

打开命令行,进入您的项目目录并执行

composer require proglab/space-client-bundle

如果您不使用symfony/flex,请通过将包添加到config/bundles.php文件中的注册包列表中来启用该包

return [
    // ...
    Proglab\SpaceClientBundle\SpaceClientBundle::class => ['all' => true],
];

src/Resources/config/proglab_space_transport.yaml复制到您的config/packages/proglab_space_transport.yaml中,并更新空间URL

最后,您必须将其添加到您的.env文件中

###> proglab/space-transport-bundle ###
SPACE_DSN=space://{{token}}@{{host_url_space}}?channel={{default_channel}}
###< proglab/space-transport-bundle ###

使用方法

默认空间通道在您的.env文件中定义。

use Proglab\SpaceClientBundle\SpaceTransport\SpaceNotification;


$notification = new SpaceNotification('Welcome Aboard', ['chat/space']);
$notification->setChannel('Xxx'); // you can override the default channel if necessary
$notifier->send($notification);