WordPress at a glance
function is not described

Requests_IRI::set_scheme() protected WP 1.0

Set the scheme. Returns true on success, false on failure (if there are any invalid characters).

{} It's a method of the class: Requests_IRI{}

No Hooks.

Return

true/false.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_scheme( $scheme );
$scheme(string) (required)

Code of Requests_IRI::set_scheme() WP 5.5.1

<?php
protected function set_scheme($scheme) {
	if ($scheme === null) {
		$this->scheme = null;
	}
	elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) {
		$this->scheme = null;
		return false;
	}
	else {
		$this->scheme = strtolower($scheme);
	}
	return true;
}