[Routing] added missing Route::setOption() method

This commit is contained in:
Fabien Potencier 2011-05-13 18:17:57 +02:00
parent faab5e4452
commit 48858cb95b

View File

@ -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.
*