feat: WebUtil::replaceDomain

This commit is contained in:
2022-08-28 17:21:37 +09:00
parent e83a1bef49
commit a43b9091f8
+6
View File
@@ -335,4 +335,10 @@ class WebUtil
return join("\n", $result);
}
public static function replaceDomain(string $origPath, string $newDomain): string{
$upath = \phpUri::parse($origPath);
$upath->authority = $newDomain;
return $upath->join('');
}
}