Download the PHP package wa72/url without Composer

On this page you can find all versions of the php package wa72/url. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package url

url

PHP class for handling and manipulating URLs. It's a pragmatic one-class lib that is completely framework independent.

Build Status Latest Version

Installation

This package is listed on Packagist.

Features and Usage

Parse a URL to an object

Easily modify and add query parameters

Compare URLs with query strings the PHP way

While in general a URL may have multiple query parameters with the same name (e.g. ?a=value1&a=value2&a=value3) and there are web applications that convert those parameters into an array, this is not the PHP way of dealing with query parameters: In PHP, the last parameter with the same name always wins, so the above query string is equal to only ?a=value3.

Similarly, while in general the order of query parameters in the query string may be significant to a web application, it is not in PHP: ?a=1&b=2 is equivalent to ?b=2&a=1 for a PHP application.

Url deals with query strings in URLs like PHP does, so the URLs in the following example are to be considered equal:

Make relative URL absolute

A given URL that has

can be turned into an absolute URL by a given base URL:

Output protocol-relative and host-relative URLs

If you want to omit the scheme, or scheme and host, when outputting the URL you can pass Url::WRITE_FLAG_OMIT_SCHEME and with Url::WRITE_FLAG_OMIT_HOST to the write()-method:

Compatibility with Psr\Http\Message\UriInterface (PSR-7)

Class Url does not implement the PSR Interface by itself for two reasons:

  1. To not introduce a new dependency on the PSR interface. The dependency is only "suggested" in composer json.
  2. Because the PSR interface is designed to be immutable, while Url is not.

To use this feature, you need to composer require psr/http-message.

More documentation to come

Meanwhile, have a look at the source code, there are lots of comments in it.

(c) Christoph Singer 2018. Licensed under the MIT license.


All versions of url with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wa72/url contains the following files

Loading the files please wait ....