All Projects → spatie → Url

spatie / Url

Licence: mit
Parse, build and manipulate URL's

Labels

Projects that are alternatives of or similar to Url

Url Polyfill
Polyfill URL and URLSearchParams to match last ES7 specifications
Stars: ✭ 294 (-25.76%)
Mutual labels:  url
Platform Espressif32
Espressif 32: development platform for PlatformIO
Stars: ✭ 333 (-15.91%)
Mutual labels:  build
Appify
Create a macOS Application from an executable (like a Go binary)
Stars: ✭ 372 (-6.06%)
Mutual labels:  build
Psdeploy
Simple PowerShell based deployments
Stars: ✭ 302 (-23.74%)
Mutual labels:  build
Tensorflow Windows Wheel
Tensorflow prebuilt binary for Windows
Stars: ✭ 3,428 (+765.66%)
Mutual labels:  build
Uri Parser
RFC3986/RFC3987 compliant URI parser
Stars: ✭ 342 (-13.64%)
Mutual labels:  url
Baur
baur manages builds and artifacts in mono repositories
Stars: ✭ 285 (-28.03%)
Mutual labels:  build
Buildtimeanalyzer For Xcode
Build Time Analyzer for Swift
Stars: ✭ 3,958 (+899.49%)
Mutual labels:  build
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (-15.15%)
Mutual labels:  build
Unity Actions
Github actions for testing and building Unity projects
Stars: ✭ 358 (-9.6%)
Mutual labels:  build
U3d
U3d is a cross-platform set of tools to interact with Unity3D from command line.
Stars: ✭ 309 (-21.97%)
Mutual labels:  build
Packr
The simple and easy way to embed static files into Go binaries.
Stars: ✭ 3,332 (+741.41%)
Mutual labels:  build
Url
URL Standard
Stars: ✭ 343 (-13.38%)
Mutual labels:  url
Ant
Apache Ant is a Java-based build tool.
Stars: ✭ 296 (-25.25%)
Mutual labels:  build
Fury
A new build tool for JVM languages
Stars: ✭ 384 (-3.03%)
Mutual labels:  build
Url Regex
Regular expression for matching URLs
Stars: ✭ 286 (-27.78%)
Mutual labels:  url
E2guardian
E2guardian is a web content filter that can work in proxy, transparent or icap server modes
Stars: ✭ 340 (-14.14%)
Mutual labels:  url
Purell
tiny Go library to normalize URLs
Stars: ✭ 391 (-1.26%)
Mutual labels:  url
Samurai
ninja-compatible build tool written in C
Stars: ✭ 390 (-1.52%)
Mutual labels:  build
Angular Bazel Example
MOVED to the bazel nodejs monorepo 👉
Stars: ✭ 354 (-10.61%)
Mutual labels:  build

Parse, build and manipulate URL's

Latest Version on Packagist Software License run-tests Total Downloads

A simple package to deal with URL's in your applications.

Retrieve parts of the URL:

use Spatie\Url\Url;

$url = Url::fromString('https://spatie.be/opensource');

echo $url->getScheme(); // 'https'
echo $url->getHost(); // 'spatie.be'
echo $url->getPath(); // '/opensource'

Transform any part of the URL (the Url class is immutable):

$url = Url::fromString('https://spatie.be/opensource');

echo $url->withHost('github.com')->withPath('spatie');
// 'https://github.com/spatie'

Retrieve and transform query parameters:

$url = Url::fromString('https://spatie.be/opensource?utm_source=github&utm_campaign=packages');

echo $url->getQuery(); // 'utm_source=github&utm_campaign=packages'
echo $url->getQueryParameter('utm_source'); // 'github'
echo $url->withoutQueryParameter('utm_campaign'); // 'https://spatie.be/opensource?utm_source=github'

Retrieve path segments:

$url = Url::fromString('https://spatie.be/opensource/laravel');

echo $url->getSegment(1); // 'opensource'
echo $url->getSegment(2); // 'laravel'

Implements PSR-7's UriInterface interface:

class Url implements UriInterface { /* ... */ }

The league/uri is a more powerful package than this one. The main reason this package exists, is because the alternatives requires non-standard php extensions. If you're dealing with special character encodings or need bulletproof validation, you're definitely better off using league/uri.

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require spatie/url

Usage

Usage is pretty straightforward. Check out the code examples at the top of this readme.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].