32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?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/galleries', App\Action\ListGalleriesAction::class, 'api.galleries');
|
|
$app->get('/image/{slug}/{image}[/{thumb}]', App\Action\GetImageAction::class, 'download.image');
|