RequestMatcher
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)
No description
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.
Details
at line line 59
__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)
at line line 77
matchScheme(string|string[]|null $scheme)
Adds a check for the HTTP scheme.
at line line 87
matchHost(string $regexp)
Adds a check for the URL host name.
at line line 97
matchPath(string $regexp)
Adds a check for the URL path info.
at line line 107
matchIp(string $ip)
Adds a check for the client IP.
at line line 117
matchIps(string|string[] $ips)
Adds a check for the client IP.
at line line 127
matchMethod(string|string[] $method)
Adds a check for the HTTP method.
at line line 138
matchAttribute(string $key, string $regexp)
Adds a check for request attribute.
at line line 146
bool
matches(Request $request)
Decides whether the rule(s) implemented by the strategy matches the supplied request.