From 48858cb95b7bd2f055aef23e41cbafd503fc87cb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 13 May 2011 18:17:57 +0200 Subject: [PATCH] [Routing] added missing Route::setOption() method --- src/Symfony/Component/Routing/Route.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 36170c49bc..c31e017146 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -99,12 +99,29 @@ class Route public function setOptions(array $options) { $this->options = array_merge(array( - 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', + 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ), $options); return $this; } + /** + * Sets an option value. + * + * This method implements a fluent interface. + * + * @param string $name An option name + * @param mixed $value The option value + * + * @return Route The current Route instance + */ + public function setOption($name, $value) + { + $this->options[$name] = $value; + + return $this; + } + /** * Get an option value. *