public function matchesPath() { $urlFrom = $this->map->getUrlFrom(); $requestUri = $this->request->getRequestUri(); if (!$this->map->getUrlFromIsRegexPattern()) { $strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower'; return $this->map->getUrlFromIsNoCase() ? $strtolower($urlFrom) === $strtolower($requestUri) : $urlFrom === $requestUri; } $regexModifier = $this->map->getUrlFromIsNoCase() ? 'i' : ''; return preg_match('#' . $urlFrom . '#' . $regexModifier, $requestUri, $this->patternMatches); }