34 lines
1.2 KiB
PHP
34 lines
1.2 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'
|
||
|
|
* );
|
||
|
|
*/
|
||
|
|
|
||
|
|
/** @var \Zend\Expressive\Application $app */
|
||
|
|
|
||
|
|
$app->get('/', App\Action\HomePageAction::class, 'home');
|
||
|
|
$app->get('/show-image/{camera}/{image}', App\Action\ShowCameraImageAction::class, 'api.show-image');
|
||
|
|
$app->get('/api/get-latest-camera-pictures', App\Action\GetLatestCameraPicturesAction::class, 'api.get-camera-pictures');
|