Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2015-09-01 (1 year ago) | | Not yet rated by the users | | Total: 245 | | All time: 7,442 This week: 874 |
|
Description | | Author |
This package is a micro-framework for Web application development.
It provides basic components to build simple Web applications like:
- Basic container
- Session service adapter
- Event dispatcher
- Router based on Symfony HttpFoundation | |
|
Details
Mabs Framework
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 @dev
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.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.