File tree 7 files changed +15
-15
lines changed
7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ public function getFunctions()
40
40
);
41
41
}
42
42
43
- public function getPath ($ name , array $ parameters = array ())
43
+ public function getPath ($ name , $ parameters = array ())
44
44
{
45
45
return $ this ->generator ->generate ($ name , $ parameters , false );
46
46
}
47
47
48
- public function getUrl ($ name , array $ parameters = array ())
48
+ public function getUrl ($ name , $ parameters = array ())
49
49
{
50
50
return $ this ->generator ->generate ($ name , $ parameters , true );
51
51
}
Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ class Controller extends ContainerAware
34
34
* Generates a URL from the given parameters.
35
35
*
36
36
* @param string $name The name of the route
37
- * @param array $parameters An array of parameters
37
+ * @param mixed $parameters An array of parameters
38
38
* @param Boolean $absolute Whether to generate an absolute URL
39
39
*
40
40
* @return string The generated URL
41
41
*/
42
- public function generateUrl ($ route , array $ parameters = array (), $ absolute = false )
42
+ public function generateUrl ($ route , $ parameters = array (), $ absolute = false )
43
43
{
44
44
return $ this ->container ->get ('router ' )->generate ($ route , $ parameters , $ absolute );
45
45
}
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ public function __construct(UrlGeneratorInterface $router)
37
37
* Generates a URL from the given parameters.
38
38
*
39
39
* @param string $name The name of the route
40
- * @param array $parameters An array of parameters
40
+ * @param mixed $parameters An array of parameters
41
41
* @param Boolean $absolute Whether to generate an absolute URL
42
42
*
43
43
* @return string The generated URL
44
44
*/
45
- public function generate ($ name , array $ parameters = array (), $ absolute = false )
45
+ public function generate ($ name , $ parameters = array (), $ absolute = false )
46
46
{
47
47
return $ this ->generator ->generate ($ name , $ parameters , $ absolute );
48
48
}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ private function get{$escapedName}RouteInfo()
78
78
79
79
return <<<EOF
80
80
81
- public function generate( \$name, array \$parameters = array(), \$absolute = false)
81
+ public function generate( \$name, \$parameters = array(), \$absolute = false)
82
82
{
83
83
if (!isset(self:: \$declaredRouteNames[ \$name])) {
84
84
throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', \$name));
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ class UrlGenerator implements UrlGeneratorInterface
33
33
'%2F ' => '/ ' ,
34
34
);
35
35
36
- private $ routes ;
37
- private $ cache ;
36
+ protected $ routes ;
37
+ protected $ cache ;
38
38
39
39
/**
40
40
* Constructor.
@@ -77,7 +77,7 @@ public function getContext()
77
77
* Generates a URL from the given parameters.
78
78
*
79
79
* @param string $name The name of the route
80
- * @param array $parameters An array of parameters
80
+ * @param mixed $parameters An array of parameters
81
81
* @param Boolean $absolute Whether to generate an absolute URL
82
82
*
83
83
* @return string The generated URL
@@ -86,7 +86,7 @@ public function getContext()
86
86
*
87
87
* @api
88
88
*/
89
- public function generate ($ name , array $ parameters = array (), $ absolute = false )
89
+ public function generate ($ name , $ parameters = array (), $ absolute = false )
90
90
{
91
91
if (null === $ route = $ this ->routes ->get ($ name )) {
92
92
throw new RouteNotFoundException (sprintf ('Route "%s" does not exist. ' , $ name ));
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface
26
26
* Generates a URL from the given parameters.
27
27
*
28
28
* @param string $name The name of the route
29
- * @param array $parameters An array of parameters
29
+ * @param mixed $parameters An array of parameters
30
30
* @param Boolean $absolute Whether to generate an absolute URL
31
31
*
32
32
* @return string The generated URL
33
33
*
34
34
* @api
35
35
*/
36
- function generate ($ name , array $ parameters = array (), $ absolute = false );
36
+ function generate ($ name , $ parameters = array (), $ absolute = false );
37
37
}
Original file line number Diff line number Diff line change @@ -171,12 +171,12 @@ public function getContext()
171
171
* Generates a URL from the given parameters.
172
172
*
173
173
* @param string $name The name of the route
174
- * @param array $parameters An array of parameters
174
+ * @param mixed $parameters An array of parameters
175
175
* @param Boolean $absolute Whether to generate an absolute URL
176
176
*
177
177
* @return string The generated URL
178
178
*/
179
- public function generate ($ name , array $ parameters = array (), $ absolute = false )
179
+ public function generate ($ name , $ parameters = array (), $ absolute = false )
180
180
{
181
181
return $ this ->getGenerator ()->generate ($ name , $ parameters , $ absolute );
182
182
}
You can’t perform that action at this time.
0 commit comments