Download the PHP package folded/url without Composer
On this page you can find all versions of the php package folded/url. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package url
folded/config
URL utilities for your PHP web app.
Summary
- About
- Features
- Requirements
- Installation
- Examples
- Version support
About
I created this library to have an easy way to use common URL functions like getting the current URL, in a standalone way.
Folded is a constellation of packages to help you setting up a web app easily, using ready to plug in packages.
- folded/action: A way to organize your controllers for your web app.
- folded/config: Configuration and environment utilities for your PHP web app.
- folded/crypt: Encrypt and decrypt strings for your web app.
- folded/exception: Various kind of exception to throw for your web app.
- folded/history: Manipulate the browser history for your web app.
- folded/http: HTTP utilities for your web app.
- folded/orm: An ORM for you web app.
- folded/request: Request utilities, including a request validator, for your PHP web app.
- folded/routing: Routing functions for your PHP web app.
- folded/session: Session functions for your web app.
- folded/view: View utilities for your PHP web app.
Features
Requirements
- PHP version >= 7.4.0
- Composer installed
Installation
In your project root folder, run this command:
Examples
- 1. Check if the current URL matches a given URL
- 2. Get the current URL
- 3. Get a query string value by key name
- 4. Get all the query strings
- 5. Check if a query string is present by key name
1. Check if the current URL matches a given URL
In this example, we will check if the current URL matches a given URL.
2. Get the current URL
In this example, we will get the current URL, including the server protocol, domain, and eventuals query strings.
3. Get a query string value by key name
In this example, we will get the value of a query string by its key name.
If the query string is not present, the function will throw an exception. To avoid this, you can use the second parameter to provide a fallback value in case the query string is not found.
4. Get all the query strings
In this example, we will get all the query strings as an associative array.
5. Check if a query string is present by key name
In this example, we will check if a query string is present.
Version support
7.3 | 7.4 | 8.0 | |
---|---|---|---|
v0.1.0 | ❌ | ✔️ | ❓ |