https://github.com/castor-labs/uri
RFC 3986 compliant URI value object for PHP
https://github.com/castor-labs/uri
composer-library php php7 querystring querystring-parser rfc3986 uri url
Last synced: 10 months ago
JSON representation
RFC 3986 compliant URI value object for PHP
- Host: GitHub
- URL: https://github.com/castor-labs/uri
- Owner: castor-labs
- License: bsd-3-clause
- Created: 2021-07-07T12:25:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-13T00:22:15.000Z (over 3 years ago)
- Last Synced: 2025-03-15T08:15:59.109Z (11 months ago)
- Topics: composer-library, php, php7, querystring, querystring-parser, rfc3986, uri, url
- Language: PHP
- Homepage:
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Castor Uri
==========


RFC 3986 compliant URI value object.
## Installation
You can install the latest stable version with:
```bash
composer require castor/uri
```
## Quick Start
```php
getScheme(); // Prints: https
echo $uri->getHost(); // Prints: example.com
echo $uri->getPath(); // Prints: /hello
echo $uri->getRawQuery(); // Prints: foo=bar
echo $uri->getQuery()->add('foo', 'foo')->encode(); // Prints: foo=bar&foo=foo
```
To learn about the rationale behind this library, best practices when using it and implementation examples, check
the [documentation](https://castor-labs.github.io/docs/packages/uri/intro.html).