RequestMatcher::matchScheme()

matchScheme(string|string[]|null $scheme) Adds a check for the HTTP scheme. Parameters string|string[]|null $scheme An HTTP scheme or an array of HTTP schemes

RequestMatcherInterface

interface RequestMatcherInterface RequestMatcherInterface is the interface that all request matcher classes must implement. Methods array matchRequest(Request $request) Tries to match a request with a set of routes. Details array matchRequest(Request $request) Tries to match a request with a set of routes. If the matcher can not find information, it must throw one of the exceptions documented below. Parameters Request $request The request to

RequestMatcher::matchPath()

matchPath(string $regexp) Adds a check for the URL path info. Parameters string $regexp A Regexp

RequestMatcherInterface

interface RequestMatcherInterface RequestMatcherInterface is an interface for strategies to match a Request. Methods bool matches(Request $request) Decides whether the rule(s) implemented by the strategy matches the supplied request. Details bool matches(Request $request) Decides whether the rule(s) implemented by the strategy matches the supplied request. Parameters Request $request The request to check for a match Return Value bool true if

RequestMatcher::matchMethod()

matchMethod(string|string[] $method) Adds a check for the HTTP method. Parameters string|string[] $method An HTTP method or an array of HTTP methods

RequestMatcher::matchIps()

matchIps(string|string[] $ips) Adds a check for the client IP. Parameters string|string[] $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24

RequestMatcher::matchIp()

matchIp(string $ip) Adds a check for the client IP. Parameters string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24

RequestMatcher::matchAttribute()

matchAttribute(string $key, string $regexp) Adds a check for request attribute. Parameters string $key The request attribute name string $regexp A Regexp

RequestMatcher::matchHost()

matchHost(string $regexp) Adds a check for the URL host name. Parameters string $regexp A Regexp

RequestMatcher::matches()

bool matches(Request $request) Decides whether the rule(s) implemented by the strategy matches the supplied request. Parameters Request $request The request to check for a match Return Value bool true if the request matches, false otherwise