Class UriNormalize

Summary

Fully Qualified Name: Zend\Filter\UriNormalize
Extends: AbstractFilter

Description

Methods

Name Description Defined By
__construct() Sets filter options UriNormalize
__invoke() Invoke filter as a command AbstractFilter
filter() Filter the URL by normalizing it and applying a default scheme if set UriNormalize
getOptions() Retrieve options representing object state AbstractFilter
hasPcreUnicodeSupport() AbstractFilter
setDefaultScheme() Set the default scheme to use when parsing scheme-less URIs UriNormalize
setEnforcedScheme() Set a URI scheme to enforce on schemeless URIs UriNormalize
setOptions() AbstractFilter

Method Details

__construct()

Sets filter options

Parameter Name Type Description
$options array|\Traversable|null

Returns:

__invoke()

Invoke filter as a command

Proxies to {@link filter()}

Parameter Name Type Description
$value mixed

Returns: mixed

filter()

Filter the URL by normalizing it and applying a default scheme if set

Parameter Name Type Description
$value string

Returns: string

getOptions()

Retrieve options representing object state

Returns: array

hasPcreUnicodeSupport()

Returns: bool

setDefaultScheme()

Set the default scheme to use when parsing scheme-less URIs

The scheme used when parsing URIs may affect the specific object used to normalize the URI and thus may affect the resulting normalize URI.

Parameter Name Type Description
$defaultScheme string

Returns: self

setEnforcedScheme()

Set a URI scheme to enforce on schemeless URIs

This allows forcing input values such as 'www.example.com/foo' into 'http://www.example.com/foo'.

This should be used with caution, as a standard-compliant URI parser would regard 'www.example.com' in the above input URI to be the path and not host part of the URI. While this option can assist in solving real-world user mishaps, it may yield unexpected results at times.

Parameter Name Type Description
$enforcedScheme string

Returns: self

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: self

Top