Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($path=null, $host=null, $methods=[], $schemes=[]) | |
matches (RequestInterface $request) | |
A port of the Symfony RequestMatcher for PSR-7.
Definition at line 14 of file vendor/php-http/message/src/RequestMatcher/RequestMatcher.php.
Http\Message\RequestMatcher\RequestMatcher::__construct | ( | $path = null , |
|
$host = null , |
|||
$methods = [] , |
|||
$schemes = [] |
|||
) |
The regular expressions used for path or host must be specified without delimiter. You do not need to escape the forward slash / to match it.
string | null | $path | Regular expression for the path |
string | null | $host | Regular expression for the hostname |
string | string[] | null | $methods | Method or list of methods to match |
string | string[] | null | $schemes | Scheme or list of schemes to match (e.g. http or https) |
Definition at line 57 of file vendor/php-http/message/src/RequestMatcher/RequestMatcher.php.
Http\Message\RequestMatcher\RequestMatcher::matches | ( | RequestInterface | $request | ) |
{Decides whether the rule(s) implemented by the strategy matches the supplied request.
RequestInterface | $request | The PSR7 request to check for a match |
@api
Implements Http\Message\RequestMatcher.
Reimplemented in Http\Message\RequestMatcher\RegexRequestMatcher, and Http\Message\RequestMatcher\CallbackRequestMatcher.
Definition at line 70 of file vendor/php-http/message/src/RequestMatcher/RequestMatcher.php.
References Psr\Http\Message\RequestInterface\getMethod(), and Psr\Http\Message\RequestInterface\getUri().