WpOrg\Requests
Iri::set_scheme()
Set the scheme. Returns true on success, false on failure (if there are any invalid characters).
Method of the class: Iri{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->set_scheme( $scheme );
- $scheme(string) (required)
- -
Iri::set_scheme() Iri::set scheme code WP 6.6.2
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; }