Download the PHP package loner/http-route without Composer

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

HTTP 请求注解路由器

该组件主要功能:定义路由、注册路由、检索路由。

实现方式:定义路由开关并注册到路由器,然后通过路由器检索符合条件(请求路径、请求方法、请求域名)的路由。路由器是纯静态的。

路由的定义和注册有两种方式:

  1. 常规:创建路由开关对象,进行相关配置,执行注册方法
  2. 注解:给控制器类及方法添加相关注解,将其反射载入到路由器;是常规方式的注解化包装

运行环境

安装

使用说明

一、检索路由

二、常规方式定义注册路由

  1. 创建路由开关

  2. 路由开关配置

  3. 注册路由

  4. 路径规则说明

三、注解方式定义注册路由

注解定义有两种方式:Controller + Map、Resource。

Controller 和 Resource 作用在类上,Map 作用在类方法上。

此外,还有组件注解,可作用在类和类方法上(两者冲突时,类方法优先),对路由进行补充。

组件注解相当于路由开关配置,参数也一致,分别为:Domains、Middlewares、Where、Cache。

  1. 控制器类添加注解

  2. 将控制器反射载入到路由器

All versions of http-route with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 loner/http-route contains the following files

Loading the files please wait ....