Configure dispatcher options

@param string $option A case-insensitive option key
@param mixed $value The value to assign
@throws \DomainException On unknown option key
@return \Amp\Dispatcher Returns the current object instance
330647
public function setOption($option, $value) {
        switch ($option) {
            case self::OPT_THREAD_FLAGS:
                $this->setThreadStartFlags($value); break;
            case self::OPT_POOL_SIZE_MIN:
                $this->setPoolSizeMin($value); break;
            case self::OPT_POOL_SIZE_MAX:
                $this->setPoolSizeMax($value); break;
            case self::OPT_TASK_TIMEOUT:
                $this->setTaskTimeout($value); break;
            case self::OPT_IDLE_WORKER_TIMEOUT:
                $this->setIdleWorkerTimeout($value); break;
            case self::OPT_EXEC_LIMIT:
                $this->setExecutionLimit($value); break;
            case self::OPT_IPC_URI:
                $this->setIpcUri($value); break;
            case self::OPT_UNIX_IPC_DIR:
                $this->setUnixIpcSocketDir($value); break;
            default:
                throw new \DomainException(
                    sprintf('Unknown option: %s', $option)
                );
        }

        return $this;
    }
179248
public function setPolicy($value)
    {
        if (!in_array($value, self::policies(), true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_POLICY, implode(', ', self::policies())));
        }

        return $this->setAttribute('policy', $value);
    }
1039336
public function setCurlOption($option, $value)
        {
            curl_setopt($this->ch, $option, $value);

            $this->curl_options[$option] = $value;

            return $this;
        }
1279727
public function setAccountType($value)
    {
        $allowedAccountTypes = self::allowedAccountTypes();

        if (!in_array($value, $allowedAccountTypes, true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_ACCOUNT_TYPE, implode(', ', $allowedAccountTypes)));
        }

        return $this->setAttribute('accountType', $value);
    }
1212063
public function setMethod($value): self
    {
        if (!in_array($value, self::methods(), true)) {
            throw new DomainException(sprintf(self::UNEXPECTED_METHOD, implode(', ', self::methods())));
        }

        return $this->setAttribute('method', $value);
    }
399890
public function setPlace($value)
    {
        if ($value !== null &&
           !in_array($value, self::$validPlaces, true)) {
            throw new DomainError('Invalid place');
        }
        $this->parameters['place'] = $value;
        return $this;
    }
159080
public function setPromptPolicy($value): self
    {
        if (!in_array($value, self::promptPolicies(), true)) {
            throw new DomainException(sprintf(self::UNEXPECTED_POLICY, implode(', ', self::promptPolicies())));
        }

        return $this->setAttribute('promptPolicy', $value);
    }
961684
public function getOption($value)
	{
		foreach ($this->options as $option) {
			if ($option->getValue() === $value) {
				return $option;
			}
		}

		throw new DataGridColumnStatusException("Option [$value] does not exist");
	}
1168470
public function setMethod($value)
    {
        $allowedMethods = self::allowedMethods();

        if (!in_array($value, $allowedMethods, true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_METHOD, implode(', ', $allowedMethods)));
        }

        return $this->setAttribute('method', $value);
    }
182654
public function setOption(int $option, $value): self
    {
        $this->options[$option] = $value;
        return $this;
    }
1027203
public function configure($option, $value)
    {
        // Dumpy won't let you add any custom config options, only update the existing ones.
        if ( ! array_key_exists($option, $this->config)) {
            // Note: something really weird is going to happen if $option is, say, an array.
            throw new InvalidArgumentException("Invalid option name: {$option}");
        }

        // Note that:
        // 1) the passed value can be of any type and contain anything
        // 2) the option value will be overridden permanently, no way back
        $this->config[$option] = $value;
    }
674361
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return array_get($this->options, $option);
        }

        $this->options[$option] = $value;

        return $this;
    }
333225
public function option(String $options, $value) : CURL
    {
        $this->options[Helper::toConstant($options, 'CURLOPT_')] = $value;

        return $this;
    }
502731
public function setOption($key, $value)
    {
        $this->connect();

        /** @var \PDO $pdo */
        $pdo = $this->connection->getWrappedConnection();

        return $pdo->setAttribute($key, $value);
    }
855097
public function setOption($option, $value) {
        //Silence it because errors handled differently
        $res = @curl_setopt($this->handler, $option, $value);

        if($res === TRUE) {
            return $this;
        }

        throw new RuntimeException('Failed to set the following option: ' . $option);
    }
488794
public static function set($option, $value)
    {
        if (!array_key_exists($option, self::$conf))
        {
            throw new InvalidArgumentException(sprintf('Unknown option "%s"', $option));
        }

        $expected = gettype(self::$conf[$option]);
        $actual = gettype($value);
        if ($expected != $actual)
        {
            throw new InvalidArgumentException(
                sprintf('Option "%s" has type "%s", but "%s" given',
                    $option, $expected, $actual)
            );
        }

        self::$conf[$option] = $value;
    }
1074978
public function setOption($option, $value)
    {
        if (! (@ldap_set_option($this->connection, $option, $value))) {
            $code = @ldap_errno($this->connection);
            throw new OptionException(
                sprintf(
                    'Could not change option %s value: Ldap Error Code=%s - %s',
                    $code,
                    ldap_err2str($code)
                )
            );
        }
    }