@@ -78,23 +78,23 @@ use Psr\Container\ContainerInterface;
78
78
/**
79
79
* Setup routes with a single request method:
80
80
*
81
- * $app->get('/', App\Handler\HomePageHandler::class, 'home');
82
- * $app->post('/album', App\Handler\AlbumCreateHandler::class, 'album.create');
83
- * $app->put('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.put');
84
- * $app->patch('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.patch');
85
- * $app->delete('/album/:id', App\Handler\AlbumDeleteHandler::class, 'album.delete');
81
+ * $app->get('/', [ App\Handler\HomePageHandler::class] , 'home');
82
+ * $app->post('/album', [ App\Handler\AlbumCreateHandler::class] , 'album.create');
83
+ * $app->put('/album/:id', [ App\Handler\AlbumUpdateHandler::class] , 'album.put');
84
+ * $app->patch('/album/:id', [ App\Handler\AlbumUpdateHandler::class] , 'album.patch');
85
+ * $app->delete('/album/:id', [ App\Handler\AlbumDeleteHandler::class] , 'album.delete');
86
86
*
87
87
* Or with multiple request methods:
88
88
*
89
- * $app->route('/contact', App\Handler\ContactHandler::class, ['GET', 'POST', ...], 'contact');
89
+ * $app->route('/contact', [ App\Handler\ContactHandler::class] , ['GET', 'POST', ...], 'contact');
90
90
*/
91
91
return static function (Application $app, ContainerInterface $container) : void {
92
92
$app->get('/', [SomeMiddleware::class, HomePageRequestHandler::class], 'home');
93
93
};
94
94
95
95
````
96
96
97
- The Request Handler must be an implementation of ` Psr\RequestHandlerInterface `
97
+ The Request Handler must be an implementation of ` Psr\Http\Server\ RequestHandlerInterface `
98
98
99
99
```` php
100
100
<?php
0 commit comments