承接 quidphp/routing 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

quidphp/routing

Composer 安装命令:

composer require quidphp/routing

包简介

PHP library that provides a route matching and triggering procedure

README 文档

README

Release License PHP Version Style CI Code Size

About

QuidPHP/Routing is a PHP library that provides a route matching and triggering procedure. It is part of the QuidPHP package and can also be used standalone.

License

QuidPHP/Routing is available as an open-source software under the MIT license.

Documentation

QuidPHP/Routing documentation is available at QuidPHP/Docs.

Installation

QuidPHP/Routing can be easily installed with Composer. It is available on Packagist.

$ composer require quidphp/routing

Once installed, the Quid\Routing namespace will be available within your PHP application.

Requirement

QuidPHP/Routing requires the following:

Dependency

QuidPHP/Routing has the following dependency:

  • quidphp/main - Quid\Main - PHP library that provides a set of base objects and collections

The dependency will be resolved by using the Composer installation process.

Comment

QuidPHP/Routing code is commented and all methods are explained (in French).

Convention

QuidPHP/Routing is built on the following conventions:

  • Coding: No curly braces are used in a IF statement if the condition can be resolved in only one statement.
  • Config: A special $config static property exists in all classes. This property gets recursively merged with the parents' property on initialization.
  • M-VC: A route object serves as both a View and a Controller. There should be one route class per route.
  • Segment: A segment within a route path represents a dynamic value. It is wrapped around brackets. A callable that accepts or rejects the value needs to be provided.
  • Templating: Once the route is triggered, the developer has complete control and can use any HTML rendering technology it desires. Or, simply use the Quid\Base\Html methods to generate the HTML and use traits for reusable page components.
  • Traits: Traits filenames start with an underscore (_).
  • Type: Files, function arguments and return types are strict typed.

Overview

QuidPHP/Routing contains 14 classes and traits. Here is an overview:

  • BreakException - Class for an exception which breaks the root matching loop
  • Exception - Class used for a route exception, the next available route will instead be triggered
  • Flash - Class for a collection containing flash-like data, manages route key
  • Nav - Class for storing route navigation-related data
  • Redirection - Class managing a URI redirection array
  • Request - Extended class with methods to route an HTTP request
  • RequestHistory - Extended class for a collection containing a history of requests
  • Route - Abstract class for a route that acts as both a View and a Controller
  • RouteRequest - Class that analyzes if a request matches a route
  • RouteSegmentRequest - Class that analyzes if a request matches a route with segment (non-static value)
  • Routes - Class for a collection of many untriggered routes
  • Session - Extended class that adds session support for routes
  • _attrRoute - Trait that provides methods to work with routes in the attributes property
  • _service - Trait that provides methods to link a service to a route

Testing

QuidPHP/Routing contains 7 test classes:

  • BreakException - Class for testing Quid\Routing\BreakException
  • Exception - Class for testing Quid\Routing\Exception
  • Nav - Class for testing Quid\Routing\Nav
  • Redirection - Class for testing Quid\Routing\Redirection
  • Request - Class for testing Quid\Routing\Request
  • RequestHistory - Class for testing Quid\Routing\RequestHistory
  • Session - Class for testing Quid\Routing\Session

QuidPHP/Routing testsuite can be run by creating a new QuidPHP/Assert project.

quidphp/routing 适用场景与选型建议

quidphp/routing 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 209 次下载、GitHub Stars 达 4, 最近一次更新时间为 2019 年 08 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php-framework」 「quid」 「quidphp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 quidphp/routing 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 quidphp/routing 我们能提供哪些服务?
定制开发 / 二次开发

基于 quidphp/routing 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-27