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

Breadcrumb

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

function HostRequestMatcher::matches

Overrides RequestMatcherInterface::matches

File

vendor/symfony/http-foundation/RequestMatcher/HostRequestMatcher.php, line 28

Class

HostRequestMatcher
Checks the Request URL host name matches a regular expression.

Namespace

Symfony\Component\HttpFoundation\RequestMatcher

Code

public function matches(Request $request) : bool {
    return preg_match('{' . $this->regexp . '}i', $request->getHost());
}

API Navigation

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