matt-harvey/auraxx 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

matt-harvey/auraxx

最新稳定版本:v0.6.1

Composer 安装命令:

composer require matt-harvey/auraxx

包简介

A router for PHP MVC applications, based on Aura.Router

关键字:

README 文档

README

Github actions Build Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

a PSR-friendly, Aura-based, MVC-inclined PHP router

Motivation

Auraxx is an extension of the Aura.Router library, that provides certain additional functionality that I have found to be convenient for developing MVC-style web applications.

It takes its place unashamedly among the 50,000,000 other PHP router packages. I have published it mainly so I can easily reuse this code across my own projects, and I because I have no particular reason to keep it private.

This is pre-alpha-stage, pre-v1 software. The package is very unstable with breaking changes happening at any time. It's MIT licensed so you can use it if you want, but pleased be warned.

Library overview

The Auraxx\Router class is designed to be extended by an application-specific router class that defines the actual routes, and then used in conjunction with an Auraxx\Application instance for actually handling a request.

Auraxx\Router adds certain functionality to the Aura router container:

  • Allows default middleware to be defined globally, by overriding ::getDefaultMiddlewares, such that middleware order can be configured independently of per-route middleware applicability
  • A ::generateUri method for generating a PSR UriInterface instance including optional query data and fragment
  • A "convention-over-configuration" mechanism whereby the route name will, by default, determine the controller and method that will be called when that route is resolved (after the middleware layer has been traversed).
  • Automatic injection of string or integer route parameters into the controller method based on matching method parameter names and types.
  • Methods to configure middleware applicability on a per-route/-route-group basis
  • Methods to configure permitted auth roles on a per-route/-route-group basis

Detailed usage

The code has detailed documentation comment blocks. For example code that uses the library, see the test fixture directory of this repository.

Installation

composer require matt-harvey/auraxx

Contributing

If this project seems useful to you, but you'd like to improve or fix it in some way, feel free to raise an Issue or PR.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-15