Nice, a PHP microframework

Build Status Coverage Code Climate Latest Release

Nice is a simple microframework for PHP 5.4 and later. Nice integrates nikic's FastRoute router with the Symfony2 HttpKernel and Dependency Injection components.

<?php

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Nice\Application;
use Nice\Router\RouteCollector;

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

$app = new Application();
$app->set('routes', function (RouteCollector $r) {
    $r->map('/', 'home', function (Request $request) {
        return new Response('Hello, world');
    });
});
$app->run();

Extensions available

Nice is built around dependency injection extensions used by the Symfony 2 DI container. Each extension provides new services for your application, with powerful configuration options.

Nice comes with built-in support for session management and logging utilizing Monolog.

There are many more extensions to help ease the prototyping process, including:


Powered by Codex 1.1.0