This commit is contained in:
Marcel Pociot committed 2020-04-27 12:47:12 +02:00
1 parent 981adc9a24
commit af3c5d9afe
3 files changed
+32 -22

No files matched your search

+1 -14
View File
@@ -60,19 +60,6 @@ class RouteGenerator
protected function getRoute(string $method, string $uri, $action, string $condition = ''): Route
{
$action = is_subclass_of($action, MessageComponentInterface::class)
? $this->createWebSocketsServer($action)
: app($action);
return new Route($uri, ['_controller' => $action], [], [], null, [], [$method], $condition);
}
protected function createWebSocketsServer(string $action): WsServer
{
$wServer = new WsServer(app($action));
$wServer->enableKeepAlive(app(LoopInterface::class));
return $wServer;
return new Route($uri, ['_controller' => app($action)], [], [], null, [], [$method], $condition);
}
}