The League of Extraordinary Packages

Our Packages:

Presented by The League of Extraordinary Packages

Getting Started

Uri functions

Uri parser

Uri schemes

Uri manipulations

Uri components

Uri Domain Parser

Upgrading Guide

Ftp URI

Starting with version 1.1.0 all URI objects are defined in the League\Uri namespace. The League\Uri\Schemes namespace is deprecated and will be removed in the next major release.

To ease working with FTP URIs, the library comes bundle with a URI specific FTP class League\Uri\Ftp.

Validation

The scheme of a FTP URI must be equal to ftp or be undefined. It can not contains a query and or a fragment component.

Adding contents to the fragment or query components throws an UriException exception

<?php

use League\Uri;

$uri = Uri\Ftp::createFromString('ftp://thephpleague.com/path/to/image.png;type=i');
$uri->withQuery('p=1'); // will throw an League\Uri\UriException

Apart from the fragment, the query components and the scheme definition, the FTP URIs share the same validation rules as Http URIs.