WordPress at Your Fingertips
function is not described

SimplePie_IRI::set_path() public WP 1.0

Set the ipath.

{} It's a method of the class: SimplePie_IRI{}

No Hooks.

Return

true|false.

Usage

$SimplePie_IRI = new SimplePie_IRI();
$SimplePie_IRI->set_path( $ipath, $clear_cache );
$ipath(string) (required)
-
$clear_cache **
-
Default: false

Code of SimplePie_IRI::set_path() WP 5.8.2

public function set_path($ipath, $clear_cache = false)
{
	static $cache;
	if ($clear_cache)
	{
		$cache = null;
		return;
	}
	if (!$cache)
	{
		$cache = array();
	}

	$ipath = (string) $ipath;

	if (isset($cache[$ipath]))
	{
		$this->ipath = $cache[$ipath][(int) ($this->scheme !== null)];
	}
	else
	{
		$valid = $this->replace_invalid_with_pct_encoding($ipath, '!$&\'()*+,;=@:/');
		$removed = $this->remove_dot_segments($valid);

		$cache[$ipath] = array($valid, $removed);
		$this->ipath =  ($this->scheme !== null) ? $removed : $valid;
	}

	$this->scheme_normalization();
	return true;
}