HttpUtils
class HttpUtils
Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs.
Methods
__construct(UrlGeneratorInterface $urlGenerator = null, UrlMatcherInterface|RequestMatcherInterface $urlMatcher = null)
Constructor.
createRedirectResponse(Request $request, string $path, int $status = 302)
Creates a redirect Response.
bool
string
generateUri(Request $request, string $path)
Generates a URI, based on the given path or absolute URL.
Details
at line line 41
__construct(UrlGeneratorInterface $urlGenerator = null, UrlMatcherInterface|RequestMatcherInterface $urlMatcher = null)
Constructor.
at line line 59
RedirectResponse
createRedirectResponse(Request $request, string $path, int $status = 302)
Creates a redirect Response.
at line line 100
bool
checkRequestPath(Request $request, string $path)
Checks that a given path matches the Request.
at line line 132
string
generateUri(Request $request, string $path)
Generates a URI, based on the given path or absolute URL.