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

Breadcrumb

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

function AbstractBrowser::getMetaRefreshUrl

See also

https://dev.w3.org/html5/spec-preview/the-meta-element.html#attr-meta-h…

1 call to AbstractBrowser::getMetaRefreshUrl()
AbstractBrowser::request in vendor/symfony/browser-kit/AbstractBrowser.php
Calls a URI.

File

vendor/symfony/browser-kit/AbstractBrowser.php, line 602

Class

AbstractBrowser
Simulates a browser.

Namespace

Symfony\Component\BrowserKit

Code

private function getMetaRefreshUrl() : ?string {
    $metaRefresh = $this->getCrawler()
        ->filter('head meta[http-equiv="refresh"]');
    foreach ($metaRefresh->extract([
        'content',
    ]) as $content) {
        if (preg_match('/^\\s*0\\s*;\\s*URL\\s*=\\s*(?|\'([^\']++)|"([^"]++)|([^\'"].*))/i', $content, $m)) {
            return str_replace("\t\r\n", '', rtrim($m[1]));
        }
    }
    return null;
}

API Navigation

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