Iri::get_iri(): string|false

In this article

Get the complete IRI

Return

string|false

Source

protected function get_iri() {
	if (!$this->is_valid()) {
		return false;
	}

	$iri = '';
	if ($this->scheme !== null) {
		$iri .= $this->scheme . ':';
	}
	if (($iauthority = $this->get_iauthority()) !== null) {
		$iri .= '//' . $iauthority;
	}
	$iri .= $this->ipath;
	if ($this->iquery !== null) {
		$iri .= '?' . $this->iquery;
	}
	if ($this->ifragment !== null) {
		$iri .= '#' . $this->ifragment;
	}

	return $iri;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.