@@ -49,6 +49,38 @@ public function generate($name, $parameters = array(), $referenceType = UrlGener
4949return $ this ->generator ->generate ($ name ,$ parameters ,$ referenceType );
5050 }
5151
52+ /**
53+ * Generates a URL reference (as an absolute or relative path) to the route with the given parameters.
54+ *
55+ * @param string $name The name of the route
56+ * @param mixed $parameters An array of parameters
57+ * @param bool $relative Whether to generate a relative or absolute path
58+ *
59+ * @return string The generated URL reference
60+ *
61+ * @see UrlGeneratorInterface
62+ */
63+ public function path ($ name ,$ parameters =array (),$ relative =false )
64+ {
65+ return $ this ->generator ->generate ($ name ,$ parameters ,$ relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH );
66+ }
67+
68+ /**
69+ * Generates a URL reference (as an absolute URL or network path) to the route with the given parameters.
70+ *
71+ * @param string $name The name of the route
72+ * @param mixed $parameters An array of parameters
73+ * @param bool $schemeRelative Whether to omit the scheme in the generated URL reference
74+ *
75+ * @return string The generated URL reference
76+ *
77+ * @see UrlGeneratorInterface
78+ */
79+ public function url ($ name ,$ parameters =array (),$ schemeRelative =false )
80+ {
81+ return $ this ->generator ->generate ($ name ,$ parameters ,$ schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL );
82+ }
83+
5284/**
5385 * {@inheritdoc}
5486 */