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

Breadcrumb

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

function UrlMatcher::createRequest

@internal

1 call to UrlMatcher::createRequest()
UrlMatcher::handleRouteRequirements in vendor/symfony/routing/Matcher/UrlMatcher.php
Handles specific route requirements.

File

vendor/symfony/routing/Matcher/UrlMatcher.php, line 255

Class

UrlMatcher
UrlMatcher matches URL based on a set of routes.

Namespace

Symfony\Component\Routing\Matcher

Code

protected function createRequest(string $pathinfo) : ?Request {
    if (!class_exists(Request::class)) {
        return null;
    }
    return Request::create($this->context
        ->getScheme() . '://' . $this->context
        ->getHost() . $this->context
        ->getBaseUrl() . $pathinfo, $this->context
        ->getMethod(), $this->context
        ->getParameters(), [], [], [
        'SCRIPT_FILENAME' => $this->context
            ->getBaseUrl(),
        'SCRIPT_NAME' => $this->context
            ->getBaseUrl(),
    ]);
}

API Navigation

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