GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Routing/ |
Upload File : |
<?php namespace Drupal\Core\Routing; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\RequestContext as SymfonyRequestContext; /** * Holds information about the current request. * * @todo: Remove once the upstream RequestContext provides fromRequestStack(): * https://github.com/symfony/symfony/issues/12057 */ class RequestContext extends SymfonyRequestContext { /** * The scheme, host and base path, for example "http://example.com/d8". * * @var string */ protected $completeBaseUrl; /** * Populates the context from the current request from the request stack. * * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack * The current request stack. */ public function fromRequestStack(RequestStack $request_stack) { $this->fromRequest($request_stack->getCurrentRequest()); } /** * {@inheritdoc} */ public function fromRequest(Request $request) { parent::fromRequest($request); // @todo Extract the code in DrupalKernel::initializeRequestGlobals. // See https://www.drupal.org/node/2404601 if (isset($GLOBALS['base_url'])) { $this->setCompleteBaseUrl($GLOBALS['base_url']); } } /** * Gets the scheme, host and base path. * * For example, in an installation in a subdirectory "d8", it should be * "https://example.com/d8". */ public function getCompleteBaseUrl() { return $this->completeBaseUrl; } /** * Sets the complete base URL for the Request context. * * @param string $complete_base_url * The complete base URL. */ public function setCompleteBaseUrl($complete_base_url) { $this->completeBaseUrl = $complete_base_url; } }