Download the PHP package innova2/url-builder without Composer
On this page you can find all versions of the php package innova2/url-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innova2/url-builder
More information about innova2/url-builder
Files in innova2/url-builder
Package url-builder
Short Description A lightweight PHP 7.4+ library with many features to easy build URLs
License MIT
Homepage https://github.com/InnovA2/url-builder-php
Informations about the package url-builder
Url-Builder
A lightweight library with many features to easy build URLs
- Features
- Installation
- Usage
- Create from existing URL
- Handle path
- Handle query param
- Work with parent
- Get relative path
- Get query params in string
- Convert full URL to string
- Advanced
- Compare URL to another
- Get word between two others
- Split path from string (static)
- Trim path from string (static)
- API
- Licence
- Authors
- Contributors
:bookmark_tabs: Features
This library allows :
- Create URLs most easly
- Parse and decompose your URLs
- Ride up in the URL tree
- Make comparisons between URLs
:hammer_and_wrench: Installation
To import the library you just need to run this command :
:memo: Usage
Create from existing URL
Handle path
Add new path segment(s)
Add multiples parameters
Get the first path segment
Get the last path segment
Handle query param
Add new query param
Add multiples query params
Work with parent
Get parent URL easly.
This function return a new instance of UrlBuilder
Or up to the specific level
Get relative path
Retrieve the relative path in string format
And with query params
Don't forget to add 'true' parameter to allow query params conversion
Get query params in string
Retrieve the query params in string format
Convert full URL to string
Retrieve the query params in string format
:memo: Advanced
Compare URL to another
Compare the current URL to another URL (UrlBuilder instance)
Get word between two others
Compare the current URL to another URL (UrlBuilder instance)
Split path from string (static)
Split path string by slash
Trim path from string (static)
Trim path string by removing useless slashes
:gear: API
:balance_scale: Licence
MIT
:busts_in_silhouette: Authors
:handshake: Contributors
Do not hesitate to participate in the project! Contributors list will be displayed below.