pyrsmk / lumy3
此包已废弃且不再维护。未建议替代包。
基于瘦土/黑钙土的框架
3.2.0
2017-05-27 08:56 UTC
Requires
- php: >=5.4.0
- pyrsmk/chernozem: ^4.2
- slim/slim: ^3.8
This package is auto-updated.
Last update: 2020-01-29 15:58:36 UTC
README
Lumy只是一个合并了Slim框架和Chernozem容器的包装器。请阅读两份文档了解如何使用Lumy。
简单示例
$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();
许可证
MIT.