Requests_IRI::set_path()
最后更新于:2021-11-26 03:59:48
Requests_IRI::set_path( string$ipath)Set the ipath.
参数
- $ipath
-
(string) (Required)
响应
(bool)
源文件
文件: gc-includes/Requests/IRI.php
protected function set_path($ipath) {
static $cache;
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;
}