Zend Framework  3.0
Static Public Member Functions | Static Protected Attributes | List of all members
UriFactory Class Reference

URI Factory Class. More...

Static Public Member Functions

static static registerScheme ($scheme, $class)
 Register a scheme-specific class to be used.
 
static unregisterScheme ($scheme)
 Unregister a scheme.
 
static getRegisteredSchemeClass ($scheme)
 Get the class name for a registered scheme.
 
static factory ($uriString, $defaultScheme=null)
 Create a URI from a string.
 

Static Protected Attributes

static $schemeClasses
 

Detailed 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

Member Function Documentation

static factory (   $uriString,
  $defaultScheme = null 
)
static

Create a URI from a string.

Parameters
string$uriString
string$defaultScheme
Exceptions
Exception\InvalidArgumentException
Returns
static getRegisteredSchemeClass (   $scheme)
static

Get the class name for a registered scheme.

If provided scheme is not registered, will return NULL

Parameters
string$scheme
Returns
string|null
static static registerScheme (   $scheme,
  $class 
)
static

Register a scheme-specific class to be used.

Parameters
string$scheme
string$class
static unregisterScheme (   $scheme)
static

Unregister a scheme.

Parameters
string$scheme

Member Data Documentation

$schemeClasses
staticprotected
Initial value:
= [
'http' => 'Zend\Uri\Http'