承接 coderovich/yii2-pushover 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

coderovich/yii2-pushover

Composer 安装命令:

composer require coderovich/yii2-pushover

包简介

A Yii2 PushOver log target and pushover messaging component

README 文档

README

Yii2 Pushover provides a component and log targets to send Pushover (https://pushover.net/) messages.

Install

composer require consynki/yii2-pushover "*"

Or add "consynki/yii2-pushover": "*" to your composer.json file and run composer update

In config file:

'components' => [
    'pushover' => [
        'class' => 'consynki\yii\pushover\Pushover',
    	'user_key' => '<your-user-key>',
    	'api_key' => '<your-api-key>',

    ],
    'log' => [
        'targets' => [
            [
                'class' => 'consynki\yii\pushover\Target',
                'levels' => ['error'],
                'except' => ['yii\web\HttpException:404'],
            ]
        ],
    ],
]

You only need to confider the log target if you wish to send messages to pushover via the logging system. If you wish you can manual send messages directly via the component.

The log trace will support any additional standard Yii2 log target params.

It is recommended to limit the number of messages that are sent via pushover to critical issues. The best option is to only send errors, in addition you can ignore particular common error types events 404

If application doesn't have pushover component, no errors will try to be logged to pushover. This is useful for development environments, for example.

Usage

Pushover Component

If you would like to send a message without using the log target you can simply use the component directly

Yii::$app->pushover->send($message, $title, $sound);

Log Target

Exceptions and PHP errors are caught without effort. Standart Yii::(error|warning|info|trace) logging works as usual, but you also can use the following format:

Yii::error('Error Message', 'Error Category')

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固