2017-07-31 15:50:48 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Setup routes with a single request method:
|
|
|
|
|
*
|
|
|
|
|
* $app->get('/', App\Action\HomePageAction::class, 'home');
|
|
|
|
|
* $app->post('/album', App\Action\AlbumCreateAction::class, 'album.create');
|
|
|
|
|
* $app->put('/album/:id', App\Action\AlbumUpdateAction::class, 'album.put');
|
|
|
|
|
* $app->patch('/album/:id', App\Action\AlbumUpdateAction::class, 'album.patch');
|
|
|
|
|
* $app->delete('/album/:id', App\Action\AlbumDeleteAction::class, 'album.delete');
|
|
|
|
|
*
|
|
|
|
|
* Or with multiple request methods:
|
|
|
|
|
*
|
|
|
|
|
* $app->route('/contact', App\Action\ContactAction::class, ['GET', 'POST', ...], 'contact');
|
|
|
|
|
*
|
|
|
|
|
* Or handling all request methods:
|
|
|
|
|
*
|
|
|
|
|
* $app->route('/contact', App\Action\ContactAction::class)->setName('contact');
|
|
|
|
|
*
|
|
|
|
|
* or:
|
|
|
|
|
*
|
|
|
|
|
* $app->route(
|
|
|
|
|
* '/contact',
|
|
|
|
|
* App\Action\ContactAction::class,
|
|
|
|
|
* Zend\Expressive\Router\Route::HTTP_METHOD_ANY,
|
|
|
|
|
* 'contact'
|
|
|
|
|
* );
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$app->get('/', App\Action\HomePageAction::class, 'home');
|
|
|
|
|
$app->get('/api/ping', App\Action\PingAction::class, 'api.ping');
|
|
|
|
|
|
|
|
|
|
$app->get('/api/kanban', App\Action\KanbanAction::class, 'api.kanban');
|
|
|
|
|
$app->get('/avatars/{signum}', App\Action\AvatarAction::class, 'user.avatar');
|
2017-09-05 19:15:17 +02:00
|
|
|
|
|
|
|
|
$app->get('/api/tsp-info', App\Action\TspInfoAction::class, 'api.tsp-info');
|