cubicmushroom/exceptions 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

cubicmushroom/exceptions

最新稳定版本:1.0.5

Composer 安装命令:

composer require cubicmushroom/exceptions

包简介

A basic, abstract exceptions class

README 文档

README

Build Status

Cubic Mushroom Exceptions

This library provides just a single abstract exception class with it's own bild() method for easily creating exceptions with various properties, passed as an array of arguments.

How to use

Just have a look at the src/CubicMushroom/Exceptions/AbstractException class methods for basic methods, but here is a brief overview...

AbstractException provides build() method that can be used to prepare exceptions to be thrown.

When using build(), you don't need to pass in a $message, $code. If you don't the default for the class will be used. This is returned by the classes getDefaultMessage() and getDefaultCode() methods, if they exist.

As it's not helpful when an exception doesn't have a message, if no message is either passed, or a default set in the exception class, a MissingExceptionMessageException will be thrown.

The build() method also accepts a second array parameter. If passed, the build() method will attempt to set all the properties on the build exception using the setter for the property. If the setter is not found, then a SetterNotFoundException will be thrown.

Roadmap

  1. Add way of defining required additional parameters
  2. More stuff, as I think of it

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固