comparison core/lib/Drupal/Core/Routing/RouteProvider.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 2
3 namespace Drupal\Core\Routing; 3 namespace Drupal\Core\Routing;
4 4
5 use Drupal\Component\Utility\Unicode;
6 use Drupal\Core\Cache\Cache; 5 use Drupal\Core\Cache\Cache;
7 use Drupal\Core\Cache\CacheBackendInterface; 6 use Drupal\Core\Cache\CacheBackendInterface;
8 use Drupal\Core\Cache\CacheTagsInvalidatorInterface; 7 use Drupal\Core\Cache\CacheTagsInvalidatorInterface;
9 use Drupal\Core\Language\LanguageInterface; 8 use Drupal\Core\Language\LanguageInterface;
10 use Drupal\Core\Language\LanguageManagerInterface; 9 use Drupal\Core\Language\LanguageManagerInterface;
343 // Split the path up on the slashes, ignoring multiple slashes in a row 342 // Split the path up on the slashes, ignoring multiple slashes in a row
344 // or leading or trailing slashes. Convert to lower case here so we can 343 // or leading or trailing slashes. Convert to lower case here so we can
345 // have a case-insensitive match from the incoming path to the lower case 344 // have a case-insensitive match from the incoming path to the lower case
346 // pattern outlines from \Drupal\Core\Routing\RouteCompiler::compile(). 345 // pattern outlines from \Drupal\Core\Routing\RouteCompiler::compile().
347 // @see \Drupal\Core\Routing\CompiledRoute::__construct() 346 // @see \Drupal\Core\Routing\CompiledRoute::__construct()
348 $parts = preg_split('@/+@', Unicode::strtolower($path), NULL, PREG_SPLIT_NO_EMPTY); 347 $parts = preg_split('@/+@', mb_strtolower($path), NULL, PREG_SPLIT_NO_EMPTY);
349 348
350 $collection = new RouteCollection(); 349 $collection = new RouteCollection();
351 350
352 $ancestors = $this->getCandidateOutlines($parts); 351 $ancestors = $this->getCandidateOutlines($parts);
353 if (empty($ancestors)) { 352 if (empty($ancestors)) {
400 399
401 /** 400 /**
402 * {@inheritdoc} 401 * {@inheritdoc}
403 */ 402 */
404 public function reset() { 403 public function reset() {
405 $this->routes = []; 404 $this->routes = [];
406 $this->serializedRoutes = []; 405 $this->serializedRoutes = [];
407 $this->cacheTagInvalidator->invalidateTags(['routes']); 406 $this->cacheTagInvalidator->invalidateTags(['routes']);
408 } 407 }
409 408
410 /** 409 /**