Aerys\Router::setOption PHP Method

setOption() public method

Set a router option
public setOption ( string $key, mixed $value )
$key string
$value mixed
    public function setOption(string $key, $value)
    {
        switch ($key) {
            case "max_cache_entries":
                if (!is_int($value)) {
                    throw new \TypeError(sprintf("max_cache_entries requires an integer; %s specified", is_object($value) ? get_class($value) : gettype($value)));
                }
                $this->maxCacheEntries = $value < 1 ? 0 : $value;
                break;
            default:
                throw new \DomainException("Unknown Router option: {$key}");
        }
    }