VCR\Request::matches PHP Method

matches() public method

Returns true if specified request matches the current one with specified request matcher callbacks.
public matches ( Request $request, array $requestMatchers ) : boolean
$request Request Request to check if it matches the current one.
$requestMatchers array Request matcher callbacks.
return boolean True if specified request matches the current one.
    public function matches(Request $request, array $requestMatchers)
    {
        foreach ($requestMatchers as $matcher) {
            if (!is_callable($matcher)) {
                throw new \BadFunctionCallException('Matcher could not be executed. ' . print_r($matcher, true));
            }
            if (call_user_func_array($matcher, array($this, $request)) === false) {
                return false;
            }
        }
        return true;
    }