class RequestMatcher implements RequestMatcherInterface
RequestMatcher compares a pre-defined set of checks against a Request instance.
Methods
__construct(string|null $path = null, string|null $host = null, string|string[]|null $methods = null, string|string[]|null $ips = null, array $attributes = array(), string|string[]|null $schemes = null) | ||
matchScheme(string|string[]|null $scheme) Adds a check for the HTTP scheme. | ||
matchHost(string $regexp) Adds a check for the URL host name. | ||
matchPath(string $regexp) Adds a check for the URL path info. | ||
matchIp(string $ip) Adds a check for the client IP. | ||
matchIps(string|string[] $ips) Adds a check for the client IP. | ||
matchMethod(string|string[] $method) Adds a check for the HTTP method. | ||
matchAttribute(string $key, string $regexp) Adds a check for request attribute. | ||
bool | matches(Request $request) Decides whether the rule(s) implemented by the strategy matches the supplied request. |
Details
__construct(string|null $path = null, string|null $host = null, string|string[]|null $methods = null, string|string[]|null $ips = null, array $attributes = array(), string|string[]|null $schemes = null)
matchScheme(string|string[]|null $scheme)
Adds a check for the HTTP scheme.
matchHost(string $regexp)
Adds a check for the URL host name.
matchPath(string $regexp)
Adds a check for the URL path info.
matchIp(string $ip)
Adds a check for the client IP.
matchIps(string|string[] $ips)
Adds a check for the client IP.
matchMethod(string|string[] $method)
Adds a check for the HTTP method.
matchAttribute(string $key, string $regexp)
Adds a check for request attribute.
bool matches(Request $request)
Decides whether the rule(s) implemented by the strategy matches the supplied request.
Please login to continue.