PHP Class Puli\Repository\Uri\Uri

Since: 1.0
Author: Bernhard Schussek ([email protected])
Show file Open project: puli/repository Class Usage Examples

Public Methods

Method Description
parse ( string $uri ) : string[] Parses a URI.

Private Methods

Method Description
__construct ( )

Method Details

parse() public static method

The returned array contains the following keys: * "scheme": The scheme part before the "://"; * "path": The path part after the "://". The URI must fulfill a few constraints: * the scheme must consist of alphabetic characters only; * the scheme may be omitted. Then "://" must be omitted too; * the path must not be empty; * the path must start with a forward slash ("/"). If any of these constraints is not fulfilled, an {@link InvalidUriException} is thrown.
public static parse ( string $uri ) : string[]
$uri string A URI string.
return string[] The parts of the URI.