/** * Handler for reverse-routing. * * @param string $path * @param string|array $query */ public function reverseRoute(&$path, &$query) { // remove matching base path $baseUrl = URL::getDefaultBaseUrl(); $basePath = $baseUrl['path']; $basePathRemoved = false; if (StringHelper::startsWith($path, $basePath) && $path !== '/') { $path = substr($path, strlen($basePath)); $basePathRemoved = true; } //\Curry_Route_ModelRoute::reverse($path, $query); // re-add base path if it was removed if ($basePathRemoved) { $path = $basePath . $path; } }