The League of Extraordinary Packages

Our Packages:

Presented by The League of Extraordinary Packages

Getting Started

Uri parser

Uri schemes

Uri manipulations

Uri components

Upgrading Guide


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


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


use League\Uri\Schemes\Ftp as FtpUri;

$uri = FtpUri::createFromString(';type=i');
$uri->withQuery('p=1'); // will throw an League\Uri\Schemes\UriException

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