承接 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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固