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