Download the PHP package raylin666/routing without Composer

On this page you can find all versions of the php package raylin666/routing. 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 routing

Web HTTP Router

GitHub release PHP version

环境要求

安装说明

使用方式

可以通过 RouteCollection 对象设置路由,也可以通过路由列表创建路由.

静态路由

路由匹配并不会将路由的回调进行调用,但会返回整个 Route,方便回调处理,因此 match 仅返回匹配成功的路由对象

动态路由

在动态路由下,成功匹配的路由会将匹配成功的参数更新到 getParameters 中,通过 getParameters 获取成功匹配的参数信息。

同个路由, 多个方法

混合路由

在很多情况下,我们路由可能只差一个参数,以下做个例子。

路由组

路由组会在你每个子路由钱添加自己的路由前缀,支持多层嵌套。

模糊路由

模糊路由的灵感来自于 Swoole http server 的 onRequest 回调中,因为每个路由入口都经过 onRequest,那么自己造的时候,可能会有一些根据 pathinfo 进行处理的特殊路由,那么此时模糊路由就可以派上用场了。

匹配凡是以 /api 开头的所有合法路由,然后进行回调

路由中间件

路由组件实现了路由中间件,基于 HttpHTTP Middlewares 实现。

路由中间件回调会自动回调 Psr\Http\Message\ServerRequestInterfaceRaylin666\Middleware\DelegateInterface 两个对象作为参数。

中间件调用完成后,会返回 \Psr\Http\Message\ResponseInterface 对象,用于程序最终处理输出。

更新日志

请查看 CHANGELOG.md

联系

如果你在使用中遇到问题,请联系: kaka 梦很美


All versions of routing with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
raylin666/middleware Version ^1.0
raylin666/http 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 raylin666/routing contains the following files

Loading the files please wait ....