Closed nyamsprod closed 1 year ago
As my use case will involve dealing with an argument being League\Uri\Contracts\UriInterface
, am I right when thinking that the usage of those new methods would look like that ?
return BaseUri::from($uri)->unixPath();
@stof you are correct on the usage. This way any kind of URI can be used even string URI.
This PR resolve #124 by adding two new methods to
BaseUri
:BaseUri::windowsPath
BaseUri::unixPath
The conversion can only be made if there is no scheme OR if the scheme is
file
. For any other scheme the methods will returnnull
.