Esempio n. 1
0
File: index.php Progetto: noikiy/owl
<?php

$serviceManager = new \Owl\Service\Manager();
$router = new \Owl\Router\Router();
$router->add('/', ['action' => '/']);
$router->add('/user/{id:int}/', ['action' => 'view']);
$router->add('/users', ['action' => 'users']);
$serviceManager->set('router', $router);
$application = new \Owl\Application($serviceManager);
$application->handle(\Owl\Http\Request::createFromGlobals(), new \Owl\Http\Response());