Download the PHP package hehex/hehep-hrouter without Composer

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

hehep-hrouter

介绍

组件配置

路由配置

路由管理器

路由请求

路由解释器

路由缓存

路由定义

说明

常规路由

变量路由

可选变量路由

私有变量路由

默认变量路由

带域名路由

绑定类路由

常用变量表达式

表达式 说明 示例
\w+ 由数字、26个英文字母,下划线 'user/\<action:\w+>'
\d+ 非负整数(正整数 + 0) 'user/\<id:\d+>'
[a-z]+ 26个小写字母 'http://\<lang:[z-z]+>.xxx.cn'
.+,.* 任意字符 'user/get\<param:.+>'
\d{4} 日期格式 news/list/\<year:\d{4}>/\<month:\d{2}>/\<day:\d{2}>
[^\/]+ 匹配除了'/'以外的字符 news/search/\<keyword:[^\/]+>

路由规则参数

参数 说明 方法名 示例
domain 是否域名检测 asDomain asDomain(true)
suffix 生成URL是否加入后缀 asSuffix asSuffix("html")
method 请求类型 asMethod asMethod("get")
id 路由唯一标识 asId asId("news")
params "路由规则"变量集合 asParams asParams(["id"=>"\d+"])
defaults 默认变量集合 asDefaults asDefaults(['lang'=>'en'])
completeMatch 是否完全匹配路由规则,默认完全匹配 asCompleteMatch asCompleteMatch(false)
prule Url参数配置规则 asParamsRule asParamsRule(['pvar'=>'params','class'=>'xxx'])

分组路由

设置规则参数

带变量分组

合并路由解析

分组参数同步子路由

参数 方法 分组路由 子路由 同步至子路由 说明
suffix asSuffix() 统一设置子路由后缀
id asId() 统一设置子路由的id前缀,如分组id:admin::,如子路由id:user,最终子路由id:admin::user
params asParams() 统一设置子路由变量,子路由变量与分组变量合并,并且子路由变量优先
prefix asPrefix("blog/") 统一设置子路由action前缀(首字符为"/"的除外),分组prefix:blog/,子路由action:list,最终子路由action:blog/list
mergeRule asMergeRule(5) ✗; 路由规则合并成一条正则表达式进行验证,可以指定一次合并N条

域名路由

URL参数解析

分隔符(split)格式

PATHINFO分隔格式

Url地址生成

常规生成URL

由路由标识生成URL

生成带后缀URL

生成带域名URL

生成带锚点URL

restful路由

注解路由

扩展路由


All versions of hehep-hrouter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.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 hehex/hehep-hrouter contains the following files

Loading the files please wait ....