Ftp URI
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.
<?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.