Requests_IRI::set_scheme( string $scheme )
Set the scheme. Returns true on success, false on failure (if there are any invalid characters).
Description Description
Parameters Parameters
- $scheme
-
(string) (Required)
Return Return
(bool)
Source Source
File: wp-includes/Requests/IRI.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; }
Expand full source code Collapse full source code View on Trac