Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 30, 2024 via composer

sabre/uri 3.0.1

Functions for making sense out of URIs.
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
18 Nov 2014
Version published
9 Jun 2023
Maintainers
2
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
sabre/uri@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of sabre/uri 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does sabre/uri do?

Sabre/uri is a potent lightweight library in PHP, designed to provide a plethora of features for working with URIs. It adheres strictly to the guidelines provided by RFC3986. Drawing inspiration from the Node.js URL library, the sabre/uri project evolved to tackle real-world PHP application concerns. The package provides valuable functions to resolve relative URLs, normalize URLs for comparison, parse, and build URLs, and split URLs to retrieve 'dirname' and 'basename'. In terms of versatility, it meets criteria for a wide range of PHP versions, ranging from PHP 5.4.7 to the latest PHP 7.4.

How do you use sabre/uri?

Utilizing sabre/uri in your PHP project is incredibly straightforward. First, you'd need to install it using composer with the command composer require sabre/uri. Once installed, you can use the functions it provides:

<?php

use Sabre\Uri;

// Resolve relative URLs:
$resolvedURL = Uri\resolve('http://example.org/foo', '../bar'); // returns "http://example.org/bar"

// Normalize URLs:
$normalizedURL = Uri\normalize('HTTP://www.Example.com/'); // returns "http://www.example.com/"

// Parse URLs:
$parsedURL = Uri\parse('http://username:password@example.com:81/path?arg=value#anchor');

// Build URLs:
$builtURL = Uri\build($parsedURL); // returns 'http://username:password@example.com:81/path?arg=value#anchor'

// Split URLs:
$splitURL = Uri\split('http://www.example.com/path/to'); // returns array('http://www.example.com/path/', 'to')

?>

Remember, sabre/uri simplifies handling various URL related tasks, such as resolving relative URIs to absolute URIs, URL normalization, and parsing or building URLs from components.

Where are the sabre/uri docs?

The official sabre/uri documentation can be found directly on the sabre.io website. For a deep dive into installation processes, usage, examples, and more, visit the sabre/uri documentation. It's a well-maintained resource, perfect for both beginners taking their first steps with the library and experienced developers looking for comprehensive feature descriptions. For unanswered inquiries, you can consider joining the sabre/dav mailing list or opening a ticket on GitHub.