Download the PHP package liuchang103/hyperf-exception without Composer

On this page you can find all versions of the php package liuchang103/hyperf-exception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-exception

hyperf-exception

Hyperf 的异常错误处理,有 Json 和 View 自定义渲染

安装

引入包

使用

直接抛出 Json

直接抛出 View 视图

进阶

继承 Json

使用常量约定 code 码,让控制器中消失 “数字”

定义 Http 状态码

定义 json 格式

自定义传参

继承 View

使用常量约定 VIEW,让控制器中消失 “模版名”

定义 Http 状态码

自定义视图传参

自定义处理

如果需要自定义渲染,可继承 \HyperfException\Exception 并实现 render 方法,会接收 response 的对象

HTTP_STATUS 状态码是在更深一层的自定义处理中.

如果要自定义处理,可实现 handle 方法,同样会接收 response 的对象

(注意:实现 handle 方法后,HTTP_STATUS 常量将无效,render 渲染方法也将无效)


All versions of hyperf-exception with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-swoole Version >=4.5
hyperf/framework Version 2.*
hyperf/di Version 2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package liuchang103/hyperf-exception contains the following files

Loading the files please wait ....