/** * Compiles the path * * @param Context $context * @return UrlNode */ public function compilePath(Context $context) { $path = $this->path->compile($context); if (!$path instanceof UrlNode) { $rootPath = $this->currentFileInfo && $this->currentFileInfo->rootPath ? $this->currentFileInfo->rootPath : false; if ($rootPath) { $pathValue = $path->value; // Add the base path if the import is relative if ($pathValue && Util::isPathRelative($pathValue)) { $path->value = $rootPath . $pathValue; } } $path->value = Util::normalizePath($path->value); } return $path; }