Download the PHP package constanze-standard/request-handler without Composer

On this page you can find all versions of the php package constanze-standard/request-handler. 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 request-handler

Constanze standard request handler

GitHub license Coverage 100%

PSR-15 请求处理程序

The PSR-15 request handler.

简介

这时是一个遵循 PSR-15 标准的请求与中间件处理器,用于构建中间件应用程序,并派发请求。

安装

composer require constanze-standard/request-handler

开始使用

Request handler 需要和 PSR-7 标准结合使用,我们的示例使用 guzzlehttp/psr7, 你可能需要首先安装它,当然,你也可以选择使用自己熟悉的 psr/http-message 实现方案。

首先需要定义一个 PSR-15 RequestHandler 作为应用程序的核心初始化派发器 Dispatcher

现在我们可以向派发器添加中间件了,中间件必须实现 psr/http-server-middleware 提供的 \Psr\Http\Server\MiddlewareInterface.

调用 addMiddleware 方法,将中间件按照从内向外的顺序添加到派发器中。

DIspatcher 在内部构建了一个栈结构的中间件应用,当添加一个中间件时,相当于向栈的外层做了 push 操作。

之后,我们触发 request handler, 通过 Dispatcher::handle 方法,自动的由栈的外层向内层依次调用,最终得到核心 handler 所返回的 response 对象。


All versions of request-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
psr/http-message Version ^1.0
psr/http-server-middleware Version ^1.0
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 constanze-standard/request-handler contains the following files

Loading the files please wait ....