rosengate/exedra 问题修复 & 功能扩展

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

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

rosengate/exedra

最新稳定版本:v1.0.16

Composer 安装命令:

composer require rosengate/exedra

包简介

Nestful route oriented PHP micro framework

README 文档

README

Build Status MIT Licence

A nestful route oriented PHP Microframework.

Introduction

This PHP microframework focuses on nestable/groupable URI path/segments based routing, that allows you to prototype your application through URI routing without losing control over it's depth. Route is unique and identifiable by name, tag and queriable through request dispatch, or finder within URL factory. Along with nested routing, is middlewarable routing group to give you more control over your application design.

The goal is to be contextual, explicitful while being simple and extremely minimal at the same time. It can be intended to work as a supporting framework to your existing application.

Features

  • Nestable routing
  • Minimal, contextual, flexible, components agnostic
  • Annotated based route-action controller (optional)
  • Routing component built for Psr7 Http Messages
  • Psr7 middleware support
  • Container based
  • Explicit dependency injection (not auto wiring)

Documentation

More detailed documentation and installation can be found at http://exedra.rosengate.com/docs

Installation

composer require rosengate/exedra

Example

Just an example to quickly test exedra.

Create an index.php file with the following contents.

<?php
use Exedra\Routing\Group;
use Exedra\Runtime\Context;
use Exedra\Application;

require_once __DIR__ . '/vendor/autoload.php';

$app = new Application(__DIR__);

$app->map['web']->any('/hello')->group(function (Group $group) {
    $group->middleware(function (Context $context) {
        return strtoupper($context->next($context));
    });

    $group['welcome']->get('/:name')->execute(function (Context $context) {
        return 'Hello ' . $context->param('name');
    });
});

$app->dispatch();

And run a simple web server on the same dir.

php -S localhost:9000

Then open up your browser and type http://localhost:9000/hello/world to get your HELLO WORLD.

Heads up to the documentation http://exedra.rosengate.com/docs for more detailed setup.

Thank you!

I hope you guys like it!

License

MIT License

统计信息

  • 总下载量: 1.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固