定制 hiraeth/journey 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hiraeth/journey

Composer 安装命令:

composer require hiraeth/journey

包简介

Journey for the Hiraeth Nano-Framework

README 文档

README

Journey is a wrapper and set of extensions for the well known FastRoute. It provides thin wrapper which extends FastRoute's native abilities by adding an entry point for dependency resolution, parameter matching shorthands, transformers, and link generation.

Installation

composer require hireath/journey

The journey.jin configuration will be automatically copied to your config directory via opus.

Delegates

No delegates are included in this package.

Providers

No providers are included in this package.

Configuration

[journey]

group = ""

routes = {
	"/": "Hiraeth\\Journey\\WelcomeAction"
}

patterns = {
	"!": ".+",
	"#": "\\d+",
	"+": "[1-9][0-9]*",
	"c": "[a-z\\x7f-\\xff][a-z0-9\\x7f-\\xff]*",
	"m": "[a-z\\x7f-\\xff][a-z0-9\\x7f-\\xff]*"
}

transformers = {
	"!": "Hiraeth\\Journey\\StringTransformer"
}
Key Data Type Description
group string A prefix which will be appended to all routes in the section.
routes object A { key : value } list of routes to controller/actions.
patterns object A { key : value } list of parameter symbols to their regex patterns.
transformers object A { key : value } list of parameter symbols to their transformer classes.

The [journey] section is globally recognized, so it can be added to any configuration file in the system to add additional routes, patterns, or transformers. Each [journey] section is understood as it's own distinct group so all routes within that section will be prefixed by the group setting, however, at a global level all patterns, transformers, and routes are added to the same instance, so conflicts are possible.

usage

The hiraeth/jouney package provides middleware as its primary point of integration:

Middleware Works With
Hiraeth\Journey\RelayMiddleware hiraeth/relay

统计信息

  • 总下载量: 913
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固