private function createCoreFunction(Closure $core): Closure {
        return function(ServerRequestInterface $request, ResponseInterface $response, Route $route) use($core) {
            return call_user_func_array($core, [&$request, &$response, &$route]);
        };
    }