Download the PHP package cutephp/route without Composer

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

安装

在你的composer.json中添加

使用

添加基本路由

调用和HTTP方法同名的函数名来添加路由,第一个参数为接受的URI,第二个参数为任意类型。匹配成功后可通过getStorage()方法原样取出。

注意:GET路由会同意匹配HEAD请求。

获得匹配的路由

会看到结果为这是/about路由的输出

添加同时支持多种HTTP方法的路由

通过调用via方法传入多个http方法名

有名字的路由

添加可以接受参数的路由

路由参数节点使用:做前缀标识

输出结果为

添加可选参数的路由

这时/users/users/1都可匹配到此路由。如果匹配/users/1,getParams()还可获得id对应1的数组。


All versions of route with dependencies

PHP Build Version
Package Version
No informations.
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 cutephp/route contains the following files

Loading the files please wait ....