feat: WebUtil::replaceDomain
This commit is contained in:
@@ -335,4 +335,10 @@ class WebUtil
|
|||||||
|
|
||||||
return join("\n", $result);
|
return join("\n", $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function replaceDomain(string $origPath, string $newDomain): string{
|
||||||
|
$upath = \phpUri::parse($origPath);
|
||||||
|
$upath->authority = $newDomain;
|
||||||
|
return $upath->join('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user