-
Notifications
You must be signed in to change notification settings - Fork 1
Uri: withPath Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Uri
Return an instance with the specified path.
-
param
stringpath*The path to use with the new instance. -
return
static
Example:
echo $uri->getPath();
// Outputs: /post/
$uri = $uri->withPath('/new-path');
echo $uri->getPath();
// Outputs: /new-pathcomposer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
