You are here

public function Router::getOption in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Router.php \Symfony\Component\Routing\Router::getOption()

Gets an option value.

Parameters

string $key The key:

Return value

mixed The value

Throws

\InvalidArgumentException

File

vendor/symfony/routing/Router.php, line 175

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];
}