public function Router::getOption

Gets an option value.

Parameters

string $key The key:

Return value

mixed The value

Throws

\InvalidArgumentException

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php, line 158

Class

Router
The Router class is an example of the integration of all pieces of the routing system for easier use.

Namespace

Symfony\Component\Routing

Code

public function getOption($key) {
  if (!array_key_exists($key, $this->options)) {
    throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key));
  }
  return $this->options[$key];
}