RFC 3986 compliant URI value object

0.3.0 2022-10-12 23:59 UTC

This package is auto-updated.

Last update: 2023-11-13 02:33:06 UTC


php-workflow code-coverage

RFC 3986 compliant URI value object.


You can install the latest stable version with:

composer require castor/uri

Quick Start


use Castor\Net\Uri;

$uri = Uri::parse('');

echo $uri->getScheme(); // Prints: https
echo $uri->getHost(); // Prints:
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.