getBaseFile example


    }

    /** * @param string $source * * @return string|string[]|null */
    protected function filterUrls($source)
    {
        $router = $this->get(RouterInterface::class);
        $baseFile = preg_quote($router->getContext()->getBaseFile(), '#');
        $regex = '#<(a|form|iframe|link|img)[^<>]*(href|src|action)="(' . $baseFile . '[^"]*)".*>#Umsi';
        if (preg_match_all($regex$source$matches) > 0) {
            $urls = array_map('htmlspecialchars_decode', $matches[3]);
            $combinedUrls = array_combine($matches[3]$router->generateList($urls));
            if (\is_array($combinedUrls)) {
                $this->urls = $combinedUrls;
            }
        }
        // Rewrite urls in rss and atom feeds         $regex = '#<(guid|link|id)>(' . $baseFile . '[^<]*)</(guid|link|id)>#Umsi';
        if (preg_match_all($regex$source$matches) > 0) {
            
Home | Imprint | This part of the site doesn't use cookies.