Class UriFactory

Summary

Fully Qualified Name: Zend\Uri\UriFactory

Description

URI Factory Class

The URI factory can be used to generate URI objects from strings, using a different URI subclass depending on the input URI scheme. New scheme-specific classes can be registered using the registerScheme() method.

Note that this class contains only static methods and should not be instantiated

Methods

Name Description Defined By
factory() Create a URI from a string UriFactory
getRegisteredSchemeClass() Get the class name for a registered scheme UriFactory
registerScheme() Register a scheme-specific class to be used UriFactory
unregisterScheme() Unregister a scheme UriFactory

Method Details

factory()

Create a URI from a string

Parameter Name Type Description
$uriString string
$defaultScheme string

Returns: \Zend\Uri\Uri

getRegisteredSchemeClass()

Get the class name for a registered scheme

If provided scheme is not registered, will return NULL

Parameter Name Type Description
$scheme string

Returns: string|null

registerScheme()

Register a scheme-specific class to be used

Parameter Name Type Description
$scheme string
$class string

Returns:

unregisterScheme()

Unregister a scheme

Parameter Name Type Description
$scheme string

Returns:

Top