• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/routing/router.php
  • Класс: BitrixMainRoutingRouter
  • Вызов: Router::match
public function match($request)
{
	$path = urldecode($this->getUriPath($request));

	foreach ($this->routes as $route)
	{
		if ($matchResult = $route->match($path))
		{
			// check method
			if (!empty($route->getOptions()->getMethods())
				&& !in_array($request->getRequestMethod(), $route->getOptions()->getMethods(), true))
			{
				continue;
			}

			if (is_array($matchResult))
			{
				$route->getParametersValues()->setValues($matchResult);
			}

			return $route;
		}
	}
}