private function ApacheMatcherDumper::regexToApacheRegex

Converts a regex to make it suitable for mod_rewrite

Parameters

string $regex The regex:

Return value

string The converted regex

2 calls to ApacheMatcherDumper::regexToApacheRegex()
ApacheMatcherDumper::dump in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
Dumps a set of Apache mod_rewrite rules.
ApacheMatcherDumper::dumpRoute in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
Dumps a single route

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php, line 214

Class

ApacheMatcherDumper
Dumps a set of Apache mod_rewrite rules.

Namespace

Symfony\Component\Routing\Matcher\Dumper

Code

private function regexToApacheRegex($regex) {
  $regexPatternEnd = strrpos($regex, $regex[0]);
  return preg_replace('/\\?P<.+?>/', '', substr($regex, 1, $regexPatternEnd - 1));
}