From 248e501df5f6e47cb25645dc39f9f19b55fc548f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 9 Aug 2010 15:05:54 +0200 Subject: [PATCH] [Routing] added Route::setDefault() --- src/Symfony/Components/Routing/Route.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Components/Routing/Route.php b/src/Symfony/Components/Routing/Route.php index fe58449819..fc75cf0bc6 100644 --- a/src/Symfony/Components/Routing/Route.php +++ b/src/Symfony/Components/Routing/Route.php @@ -152,7 +152,7 @@ class Route } /** - * Get an default value. + * Gets a default value. * * @param string $name A variable name * @@ -163,6 +163,17 @@ class Route return isset($this->defaults[$name]) ? $this->defaults[$name] : null; } + /** + * Sets a default value. + * + * @param string $name A variable name + * @param mixed $default The default value + */ + public function setDefault($name, $default) + { + $this->defaults[$name] = $default; + } + /** * Returns the requirements. *