Timeouts can be overwritten in properties.yml under the `timeout` key.

@param string $setting

@return int
777582
protected function getTimeoutSetting($setting)
    {
        $timeoutSettings = $this->getTimeoutSettings();
        return isset($timeoutSettings[$setting]) ? $timeoutSettings[$setting] : static::DEFAULT_TIMEOUT;
    }
430713
public function settings($settings = null)
    {
        if (is_null($settings)) {
            return $this->settings;
        }

        $this->settings = $settings;
        return $this;
    }
144545
public function setting($setting, $default = null)
    {
        $value = parent::setting($setting);
        if (null === $value) {
            $value = isset(static::$globalSettings[$setting]) ? static::$globalSettings[$setting] : $default;
        }

        return $value;
    }
451225
public function make(Settings $settings) : string
    {
        $cacheKey = $this->getCacheKey($settings);

        if ($this->hasCachedData($cacheKey)) {
            return $this->getCachedData($cacheKey);
        }

        $settings->hasRequiredSettings();

        return $this->cacheData($cacheKey, $this->createOutput($settings));
    }
471223
public function timeout($delay = null) {
        if ($delay === null) {
            return $this->_timeout;
        }
        if (!$this->valid()) {
            throw new RuntimeException("Invalid stream resource, unable to set a timeout on it.");
        }
        $this->_timeout = $delay;
        return stream_set_timeout($this->_resource, 0, $delay);
    }
253577
public function timeout($time) {
		if (!is_resource($this->_resource)) {
			return false;
		}
		return stream_set_timeout($this->_resource, $time);
	}
1203454
public function getSetting(string $setting) {
		$settings = $this->getSettings();
		$keys = array_keys($settings);
		
		if (!in_array($setting, $keys)) {
			throw new ControllerException("Unknown setting: $setting.",
				ControllerException::UNKNOWN_SETTING);
		}
		
		return $settings[$setting];
	}
1129307
public function get($key)
    {
        $setting = SettingModel::where('key', $key)->first();

        return $setting ? $setting->value : false;
    }
862623
public final function get_config($setting = null) {
        global $DB;

        if ($setting) {
            if (!$this->assignment->has_instance()) {
                return false;
            }
            $assignment = $this->assignment->get_instance();
            if ($assignment) {
                $dbparams = array('assignment'=>$assignment->id,
                                  'subtype'=>$this->get_subtype(),
                                  'plugin'=>$this->get_type(),
                                  'name'=>$setting);
                $result = $DB->get_record('assign_plugin_config', $dbparams, '*', IGNORE_MISSING);
                if ($result) {
                    return $result->value;
                }
            }
            return false;
        }
        $dbparams = array('assignment'=>$this->assignment->get_instance()->id,
                          'subtype'=>$this->get_subtype(),
                           'plugin'=>$this->get_type());
        $results = $DB->get_records('assign_plugin_config', $dbparams);

        $config = new stdClass();
        if (is_array($results)) {
            foreach ($results as $setting) {
                $name = $setting->name;
                $config->$name = $setting->value;
            }
        }
        return $config;
    }
60819
public function getTimeRemaining(string $address): int
    {
        return (int)$this->get(sprintf('%s/%s', Resources::TIME_REMAINING, $address))->seconds_remaining;
    }
588484
public function setAll($timeout)
    {
        $command = $this->driver->factoryCommand('timeouts', WebDriver_Command::METHOD_POST, $timeout);
        foreach ($this->cache as &$value) {
            $value = $timeout;
        }
        return $this->driver->curl($command)['value'];
    }
810152
public function set($settings) {

        if (!$this->simple) {
            if (is_a($this->source, 'ToolConsumer')) {
                $type = 'ToolProxy';
            } else if (is_a($this->source, 'ToolConsumer')) {
                $type = 'ToolProxyBinding';
            } else {
                $type = 'LtiLink';
            }
            $obj = new \stdClass();
            $obj->{'@context'} = 'http://purl.imsglobal.org/ctx/lti/v2/ToolSettings';
            $obj->{'@graph'} = array();
            $level = new \stdClass();
            $level->{'@type'} = $type;
            $level->{'@id'} = $this->endpoint;
            $level->{'custom'} = $settings;
            $obj->{'@graph'}[] = $level;
            $body = json_encode($obj);
        } else {
            $body = json_encode($settings);
        }

        $response = parent::send('PUT', null, $body);

        return $response->ok;

    }
163967
public function getTimeout() {
        if($this->timeout)
            return $this->timeout;

        $timeout = 0;
        foreach ($this->requests as $r) {
            $timeout += $r->getTimeout();
        }
        return $timeout;
    }
417415
public function timeout($timeout = null)
    {
        // Return value
        if (empty($timeout)) {
            return $this->timeout;
        }

        // Set value
        $this->timeout = $timeout;

        return $this;
    }
272721
public function is_setting( $setting ) {
		return isset( $this->_setting_priority[ $setting ], $this->_settings[ $this->_setting_priority[ $setting ] ] );
	}
188223
public function setTimeout($timeout)
    {
        $timeout = is_scalar($timeout) ? (int) $timeout : 0;

        return $timeout < 1
            ? $this->timeout
            : $this->timeout = $timeout;
    }
575379
protected function setDataMultilineTextSettings($setting)
    {
        $data = $this->getData("settings.$setting");

        if (is_array($data)) {

            $string = '';

            foreach ($data as $key => $value) {
                $list = implode(',', (array) $value);
                $string .= "$key $list" . PHP_EOL;
            }

            $this->setData("settings.$setting", trim($string));
        }
    }