mikeismint/fruit 问题修复 & 功能扩展

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

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

mikeismint/fruit

Composer 安装命令:

composer require mikeismint/fruit

包简介

README 文档

README

My first attempt at a simple PHP router. Influenced by AltoRouter

Usage

$router = new Fruit();

// map single route
$router->addRoute('GET', '/', 'Controller#Method');

// map post details page
$router->addRoute('GET', '/^posts\/id\/(?P<id>\d+)$/', 'Controller#Method');

// map multiple routes
$router->addRoutes(array(
    array('GET', '/', 'Controller#Method'),
    array('GET', '/^posts\/id\/(?P<id>\d+)$/', 'Controller#Method'),
));

Other features

  • Accepts multiple HTTP methods separated by |
  • Uses regex to match URL pattern
  • Accepts optional fourth parameter to name routes

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-04-19