pyrsmk/lumy3

This package is abandoned and no longer maintained. No replacement package was suggested.

A Slim/Chernozem based framework

3.2.0 2017-05-27 08:56 UTC

This package is auto-updated.

Last update: 2020-01-29 15:58:36 UTC


README

Lumy is just a wrapper that merges Slim framework and Chernozem container. Please read both documentations to know how to use Lumy.

Simple example

$app = new Lumy\App();

// Add a service
$app['twig'] = $app->service(function($app) {
    $loader = new Twig_Loader_Filesystem('/path/to/templates');
    $twig = new Twig_Environment($loader, [
        'cache' => '/path/to/compilation_cache',
    ]);
});

// Add a route
$app->get('/', function($request, $response) {
    // Render the template
    $this['twig']->render('index.html', [
      'the' => 'variables',
      'go' => 'here'
    ]);
});

$app->run();

License

MIT.