kherge/exception
Composer 安装命令:
composer require kherge/exception
包简介
Simplifies the process of constructing new exceptions using formatted messages.
关键字:
README 文档
README
Exception
Simplifies the process of constructing new exceptions using formatted messages.
Usage
use KHerGe\Exception\AbstractException; class MyException extends AbstractException { } // Without any arguments. $exception = new MyException(); // With only a message. ("Example message.") $exception = new MyException('Example message.'); // With a message format and values to format. ("Example message.") $exception = new MyException('Example %s.', 'message'); // With only a previous exception. $exception = new MyException($previous); // With a message and previous exception. $exception = new MyException('Example message.', $previous); // With a message format, values to format, and a previous exception. $exception = new MyException('Example %s.', 'message', $previous);
Requirements
- PHP 7.1 or greater
Installation
Use Composer to install the package as a dependency.
$ composer require kherge/exception
Testing
Use PHPUnit 7.0 to run the test suite.
$ phpunit
License
This library is available under the Apache 2.0 and MIT licenses.
统计信息
- 总下载量: 68
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-02-21