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. | ||
RedirectResponse | createRedirectResponse(Request $request, string $path, int $status = 302) Creates a redirect Response. | |
Request | createRequest(Request $request, string $path) Creates a Request. | |
bool | checkRequestPath(Request $request, string $path) Checks that a given path matches the Request. | |
string | generateUri(Request $request, string $path) Generates a URI, based on the given path or absolute URL. |
Details
__construct(UrlGeneratorInterface $urlGenerator = null, UrlMatcherInterface|RequestMatcherInterface $urlMatcher = null)
Constructor.
RedirectResponse createRedirectResponse(Request $request, string $path, int $status = 302)
Creates a redirect Response.
bool checkRequestPath(Request $request, string $path)
Checks that a given path matches the Request.
string generateUri(Request $request, string $path)
Generates a URI, based on the given path or absolute URL.
Please login to continue.