nice / framework
A nice PHP microframework
Installs: 9 280
Dependents: 6
Suggesters: 0
Security: 0
Stars: 29
Watchers: 8
Forks: 3
Open Issues: 3
Requires
- php: >=5.4.0
- nikic/fast-route: >=0.6
- symfony/config: ~2.3
- symfony/dependency-injection: ~2.3
- symfony/http-kernel: ~2.3
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ~3.7
- symfony/debug: ~2.3
- symfony/expression-language: ~2.4
Suggests
- monolog/monolog: Provides many different logging handlers
- stack/builder: Stack HttpKernel middlewares - http://stackphp.com
This package is auto-updated.
Last update: 2024-10-25 06:29:12 UTC
README
Nice is a simple microframework for PHP 5.6 and later. Nice integrates nikic's FastRoute router with the Symfony2 HttpKernel and Dependency Injection components.
Nice comes with built-in session management, simple authentication, and logging utilizing Monolog. Twig, along with Doctrine DBAL and ORM integration is also available.
<?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();
Documentation
View the online documentation, or the check out the markdown documentation source code.