mabslabs/mabs
最新稳定版本:v2.1.1
Composer 安装命令:
composer require mabslabs/mabs
包简介
The Mabs micro framework
README 文档
README
Mabs is a PHP micro framework, speedy, light and easy to learn .
Features
- Container
- Event dispatcher
- Routing
- HttpFoundation (Symfony2 component)
- An easy way to extend PHP libraries
Getting Started
Install
You may install the Mabs Framework with Composer (recommended).
$ composer require mabslabs/mabs
Quick start
// web/index.php <?php require_once __DIR__.'/../vendor/autoload.php'; $app = new Mabs\Application(); $app->get('hello/(name)', function ($name) { return 'Hello '.$name; })->run();
More details
// web/index.php <?php require_once __DIR__.'/../vendor/autoload.php'; use \Symfony\Component\HttpFoundation\RedirectResponse; $app = new Mabs\Application(); $container = $app->getContainer(); $app->get('/', function () use ($container) { $url = $container['router']->generateUrl('hello_page', array('name' => 'World')); return new RedirectResponse($url); }); $app->get('hello/(name)', function ($name) { return 'Hello '.$name; }, 'hello_page'); $app->run();
License
This bundle is available under the MIT license.
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-21