madsleejensen/opbeat-php
最新稳定版本:v2.1.4
Composer 安装命令:
composer require madsleejensen/opbeat-php
包简介
Opbeat wrapper for PHP
README 文档
README
Simple library for communicating with the Opbeat services.
Installation
Use Composer to install this library:
composer require madsleejensen/opbeat-php
Configuration
You are required to provide a configuration handler which implements Illuminate/Contracts/Config/Repository.
Pass an instance of this config handler when initializing the Client.
Opbeat\Client will require the following settings:
opbeat.organization_id(string)opbeat.app_id(string)opbeat.access_token(string)
The following settings are optional and have a default value:
opbeat.enable_exception_handler(boolean, default: true)opbeat.enable_error_handler(boolean, default: true)
Enable Client
When you've set up your configuration, simply create an instance of Opbeat\Client. Unless you set enable_exception_handler or enable_error_handler to false, the client will automatically register a handler for both.
$client = new \Opbeat\Client($config);
Manually Catch Exception
You can also catch exceptions manually. Opbeat\Client exposes a catchException method for this:
public void catchException ( Exception $exception )
Contributing
If you experience any issues or have ideas for improvements, please open a pull request or an issue.
Pull requests must adhere to the PSR-2 and naming scheme of classes must adhere to PSR-4 with Opbeat as namespace prefix.
统计信息
- 总下载量: 4.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-16