承接 mizanur/hipchat-notifier 相关项目开发

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

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

mizanur/hipchat-notifier

Composer 安装命令:

composer require mizanur/hipchat-notifier

包简介

Hipchat Notifier for PHP

README 文档

README

Super-simple, minimum abstraction HipchatNotifier v2, in PHP.

Requires PHP 5.3 and a pulse.

Installation

You can install the hipchat-notifier using Composer:

composer require mizanur/hipchat-notifier

or

composer require mizanur/hipchat-notifier

HOW TO USER

You can start with .env or without .env

With .env

We need setup some configuration variable in .env

HIPCHAT_DOMAIN=https://example.hipchat.com
HIPCHAT_TOKEN=your-room-token
HIPCHAT_ROOM_ID=your-room-id
HIPCHAT_BOT_NAME=your-bot-name (this one is optional, default bot name is HIP-BOT)

Initialize hipchat notifier

$hipchatNotifier = new \HipchatNotifier\HipchatNotifier();

Without .env

Initialize hipchat notifier

//the last param bot-name is optional, default bot name is HIP-BOT

$hipchatNotifier = new \HipchatNotifier\HipchatNotifier('YOUR-DOMAIN','YOUR-ROOM-ID','YOUR-ROOM-TOKEN', 'BOT-NAME');

Send error notification to your hipchat room

//you can pass your color as second param (red or green or yellow) default is red

$hipchatNotifier->notifyError('YOUR ERROR MESSAGE');

//or

$hipchatNotifier->notifyError('YOUR ERROR MESSAGE', 'green');

Send success or info notification to your hipchat room

//you can pass your color as second param (red or green or yellow) default is green

$hipchatNotifier->notifyInfo('YOUR MESSAGE');

//or

$hipchatNotifier->notifyInfo('YOUR MESSAGE', 'red');

Send exception notification to your hipchat room

//you can pass your color as second param (red or green or yellow) default is red

try{
    #Your code...
}catch(\Exception $ex){
    $hipchatNotifier->notifyException($ex);
}

//or

try{
    #Your code...
}catch(\Exception $ex){
    $hipchatNotifier->notifyException($ex, 'yellow');
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固