Browse files

[Routing] add support for path-relative and scheme-relative URL gener…

…ation
  • Loading branch information...
1 parent 0b79827 commit fbfb103374e4e2bffe5e3eed78831cfbb70d57d5 @Tobion Tobion committed Apr 16, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 Extension/RoutingExtension.php
View
8 Extension/RoutingExtension.php
@@ -40,14 +40,14 @@ public function getFunctions()
);
}
- public function getPath($name, $parameters = array())
+ public function getPath($name, $parameters = array(), $relative = false)
{
- return $this->generator->generate($name, $parameters, false);
+ return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
}
- public function getUrl($name, $parameters = array())
+ public function getUrl($name, $parameters = array(), $schemeRelative = false)
{
- return $this->generator->generate($name, $parameters, true);
+ return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL);
}
/**

0 comments on commit fbfb103

Please sign in to comment.