Download the PHP package aura/uri without Composer
On this page you can find all versions of the php package aura/uri. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package uri
Short Description The Aura Uri package provides objects to build and manipulate URL strings.
License BSD-2-Clause
Homepage http://auraphp.github.com/Aura.Uri
Informations about the package uri
Aura.Uri
The Auri.Uri
package provides objects to help you create and manipulate URLs,
including query strings and path elements. It does so by splitting up the pieces
of the URL and allowing you modify them individually; you can then fetch
them as a single URL string. This helps when building complex links,
such as in a paged navigation system.
This package is compliant with PSR-0, PSR-1, and PSR-2. If you notice compliance oversights, please send a patch via pull request.
Getting Started
Instantiation
The easiest way to get started is to use the UrlFactory to create a Url object.
You can populate the URL properties from a URL string:
Alternatively, you can use the factory to create a URL representing the current web request URI:
Manipulation
After we have created the URL object, we can modify the component parts, then fetch a new URL string from the modified object.
Public Suffix List Host Parsing
Host Component Parts
In addition to URL creation and manipulation, Aura.Uri
is capable of parsing a
host into its component parts, namely the host's subdomain, registerable domain,
and public suffix. A host's component parts are available via properties on the
Aura.Uri host object, as seen in the examples above.
Public Suffix List
This parsing capability is possible as a result of the Public Suffix List, a community resource and initiative of Mozilla.
Updating the Public Suffix List
As the Public Suffix List is both an external resource and a living document, it's
important that you update your copy of the list from time to time. You can do this
by executing the provided update.php
script.
php /path/to/Aura.Uri/scripts/update.php
Executing update.php
will retrieve the most current version of the Public Suffix
List, parse it to an array, and store it in the /path/to/Aura.Uri/data
directory.