jinnguyen/puja-error
Composer 安装命令:
composer require jinnguyen/puja-error
包简介
Puja-Error are the handler layers, that handle all fatal exceptions/errors ( include fatal errors) from PHP application. Support callback function
关键字:
README 文档
README
Puja-Error are the handler layers, that handle all errors/exceptions for PHP application.
Install
composer require jinnguyen/puja-error
Usage
include '/path/to/vendor/autoload.php'; use Puja\Error\ErrorManager;
Examples
class A
{
public function b(array $erroMessage = array())
{
print_r($erroMessage); // viewsource to see how this function work
}
}
use Puja\Error\ErrorManager;
new ErrorManager(array(
'enabled' => true, // toggle on/off Error Manager
'debug' => true, // toggle on/off mode DEBUG
'error_level' => E_ALL, // same with error_reporting()
'callback_fn' => array(new A(), 'b')) // callback function, will call after application get error (you can do some stuff like: log errors, roll back db transaction, ...)
);
$a = new A();
$a->c();
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2016-12-05
