定制 meraki/route 二次开发

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

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

meraki/route

Composer 安装命令:

composer require meraki/route

包简介

README 文档

README

Scrutinizer Build Status Scrutinizer Code Quality Scrutinizer Code Coverage Packagist Latest Stable Version MIT License

Frameware-agnostic, Middleware-compatible routing framework for PHP 7+.

Installation

Composer

To install using Composer, enter the following at the command line:

composer require meraki/route

Usage

Getting Started

<?php
require_once 'vendor/autoload.php';

use Meraki\Route\Collection;
use Meraki\Route\Mapper;
use Meraki\Route\Matcher;
use Meraki\Route\MatchResult;

// any psr7 and psr11 compliant library will work
use Laminas\Diactoros\ServerRequestFactory;

$map = new Mapper(new Collection());

$map->get('/', new ShowHomepage());
$map->get('/contact', new ShowContactForm());
$map->post('/contact', new SendContactForm());

$map->get('/users/:id', new DisplayEditUserForm())
	->name('display.user.profile')
	->constrain(':id', Constraint::digit());

$map->get('/users/:id');

$matcher = new Matcher($map->getRules());
$result = $match->match(ServerRequestFactory::fromGlobals());

if ($result->isSuccessful()) {
	// handle a successful match
} else {
	// handle a failed match 404,405,406,etc.
}

Full Documentation

See the Wiki.

Testing

To run the tests, run the following script:

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email nbish11@hotmail.com instead of using the issue tracker.

Credits

Without help from the following people, software and services, this project would not have been possible. So a big thank you to all.

Authors

Contributors

Software

Services

License

The MIT License (MIT). Please see the LICENSE file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固