Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. IpsRequestMatcher.php

function IpsRequestMatcher::matches

Overrides RequestMatcherInterface::matches

File

vendor/symfony/http-foundation/RequestMatcher/IpsRequestMatcher.php, line 36

Class

IpsRequestMatcher
Checks the client IP of a Request.

Namespace

Symfony\Component\HttpFoundation\RequestMatcher

Code

public function matches(Request $request) : bool {
    if (!$this->ips) {
        return true;
    }
    return IpUtils::checkIp($request->getClientIp() ?? '', $this->ips);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal