CapMousse\ReactRestify\Server::initEvents PHP Method

initEvents() private method

Init default event catch
private initEvents ( ) : void
return void
    private function initEvents()
    {
        $this->router->on('NotFound', function ($request, $response, $next) {
            $response->write('Not found');
            $response->setStatus(404);
            $next();
        });
        $this->router->on('MethodNotAllowed', function ($request, $response, $next) {
            $response->write('Method Not Allowed');
            $response->setStatus(405);
            $next();
        });
    }