Set the scheme. Returns true on success, false on failure (if there are any invalid characters).
Parameters
$scheme
stringrequired
Source
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;
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.