Download the PHP package neunerlei/path-util without Composer
On this page you can find all versions of the php package neunerlei/path-util. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neunerlei/path-util
More information about neunerlei/path-util
Files in neunerlei/path-util
Package path-util
Short Description FORKED: A robust cross-platform utility for normalizing, comparing and modifying file paths, with extended functionality.
License MIT
Informations about the package path-util
ABANDONED / DEPRECATED
To follow the approach of webmozart/path-util I merged the path functionallity into neunerlei/filesystem, which should be used in the future as I see this repository as deprecated. I did not migrate the "makeUri" method into the filesystem bundle, as it is not really related to "filesystem" actions. So, you have to create an alternative for that yourself by using the Leage/Uri component directly.
File Path Utility (FORKED)
This package provides robust, cross-platform utility functions for normalizing, comparing and modifying file paths and URLs.
ATTENTION: This is a fork of path-util by webmozart!
What's different?
- Removed "Url" utility and replaced it with URI by PHP League
- Added new methods to the Path class
- Added tests for the new methods
- Updated PHP dependency to 7.3.0
- Updated existing code to use PHP Type Hints
- Updated tests to work with the modified code (Mostly to support the Type Hints)
- Removed dependency on "webmozart/assert"
- The Path class is no longer a "final" class
- All private methods of the Path class are now "protected"
- Removed build related files
Installation
The utility can be installed with Composer:
Basic Usage
Use the Path
class to handle file paths:
URI handling
When using the method you can supply a single parameter that will be used as a base for the generated link object. Possible parameter options are:
- string: A url represented by a string
- instance: An object that implements \League\Uri\Contracts\UriInterface or Psr\Http\Message\UriInterface
- TRUE: Let the script figure out the url based on the current $_SERVER super-global
- array: The result of parse_url() or a similarly constructed array
If no parameter is given an empty Uri object is returned. The method uses the League\Uri package under the hood. The result of the method is an instance of a PSR-7 compliant URI object.
Base Package documentation
Learn more about the forked base package in the Documentation.
Authors
Contribute
Contributions are always welcome!
- Report any bugs or issues you find on the issue tracker.
- You can grab the source code at the Git repository.
License
All contents of this package are licensed under the MIT license.
Special Thanks
Special thanks goes to the folks at LABOR.digital (which is the word german for laboratory and not the english "work" :D) for making it possible to publish my code online.
Postcardware
You're free to use this package, but if it makes it to your production environment I highly appreciate you sending me a postcard from your hometown, mentioning which of our package(s) you are using.
You can find my address here.
Thank you :D