Пример #1
0
|--------------------------------------------------------------------------
|
| configuration template engine
|
*/
$container['viewPath'] = VIEW_PATH;
$container['cachePath'] = CACHE_PATH;
$container['engine'] = function ($c) {
    return new Engine();
};
$container['view'] = $container->asShared(function ($c) {
    return new View($c['viewPath'], $c['cachePath'], $c['engine']);
});
/*
|--------------------------------------------------------------------------
| App
|--------------------------------------------------------------------------
|
| Container
|
*/
App::set($container);
/*
|--------------------------------------------------------------------------
| Dispatcher
|--------------------------------------------------------------------------
|
| Simple framework dispatch
|
*/
$dispatcher = new Dispatcher(new Request());