WpOrg\Requests
Iri::set_iri()
Set the entire IRI. 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_iri( $iri );
- $iri(string) (required)
- -
Iri::set_iri() Iri::set iri code WP 6.6.2
protected function set_iri($iri) { static $cache; if (!$cache) { $cache = array(); } if ($iri === null) { return true; } $iri = (string) $iri; if (isset($cache[$iri])) { list($this->scheme, $this->iuserinfo, $this->ihost, $this->port, $this->ipath, $this->iquery, $this->ifragment, $return) = $cache[$iri]; return $return; } $parsed = $this->parse_iri($iri); $return = $this->set_scheme($parsed['scheme']) && $this->set_authority($parsed['authority']) && $this->set_path($parsed['path']) && $this->set_query($parsed['query']) && $this->set_fragment($parsed['fragment']); $cache[$iri] = array($this->scheme, $this->iuserinfo, $this->ihost, $this->port, $this->ipath, $this->iquery, $this->ifragment, $return); return $return; }