定制 braune-digital/pitcher 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

braune-digital/pitcher

最新稳定版本:1.0.0

Composer 安装命令:

composer require braune-digital/pitcher

包简介

Pitcher Library

README 文档

README

68747470733a2f2f7777772e706974636865722d6170702e636f6d2f696d616765732f506974636865722d4c6f676f2d506f732d4269672e706e67

Pitcher App (http://www.pitcher-app.com) is a webservice which allows you to easily send exceptions from your project. In contrast to classical monitoring webservices, Pitcher is able to pitch individual exceptions from projects, where Pitcher is acting like a satellite which communicates whith ground control. Register now at pitcher-app.com and create your project. After receiving the secret, the next step is installing the PHP component (or Bundle in case of using Symfony) and linking the satellite by defining the secret.

This PHP component allows you to send notifications through different channels (iOS Push Notification, E-Mail or WAMP Websocket).

Integrations

Currently there´s a bundle for Symfony which integrates the component as a service (https://github.com/braune-digital/BrauneDigitalPitcherBundle).

Installation

Install the package with composer into your project:

composer require braune-digital/pitcher "^1.0"

Usage

The BaseClient implements the ClientInterface and allows you to pitch exceptions with GuzzleHTTP to the Pitcher App.

<?php

namespace BrauneDigital\Pitcher\Client;

use Psr\Log\LoggerInterface;

interface ClientInterface {

	/**
	 * @param $level
	 * @param $message
	 * @return mixed
	 */
	public function pitch($level, $message);

	/**
	 * @return mixed
	 */
	public function getLogger();

	/**
	 * @param LoggerInterface $
	 * @return mixed
	 */
	public function setLogger(LoggerInterface $logger);

}

You can use this BaseClient and pitch messages:

$client = new \BrauneDigital\Pitcher\Client\BaseClient('SATELLITE_NAME', 'SECRET');
$client->pitch(\BrauneDigital\Pitcher\Notification\Notification::LEVEL_CRITICAL, 'XML API from server B is down');

The Pitcher App returns a JSON-Reponse:

{"success":true,"payload":{"level":"critical","message":"XML API from server B is down","date":"2016-04-13T13:23:15+0200","satellite":"YOU_ARE_FREE_TO_CHOOSE_A_NAME","checked":false,"id":141},"errors":[]}

Now you will get notifications from the Pitcher app. You can define notification channels in your user profile at http://www.pitcher-app.com/#/login.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-12