Open Journal Systems  3.3.0
Http\Message\RequestMatcher\RequestMatcher Class Reference
Inheritance diagram for Http\Message\RequestMatcher\RequestMatcher:
Http\Message\RequestMatcher Http\Message\RequestMatcher\CallbackRequestMatcher Http\Message\RequestMatcher\RegexRequestMatcher

Public Member Functions

 __construct ($path=null, $host=null, $methods=[], $schemes=[])
 
 matches (RequestInterface $request)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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.

Parameters
string | null$pathRegular expression for the path
string | null$hostRegular expression for the hostname
string | string[] | null$methodsMethod or list of methods to match
string | string[] | null$schemesScheme 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.

Member Function Documentation

◆ matches()

Http\Message\RequestMatcher\RequestMatcher::matches ( RequestInterface  $request)

{Decides whether the rule(s) implemented by the strategy matches the supplied request.

Parameters
RequestInterface$requestThe PSR7 request to check for a match
Returns
bool true if the request matches, false otherwise
}

@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().


The documentation for this class was generated from the following file: