724. Class

724.1. Zend\Filter\UriNormalize

724.1.1. Methods

724.1.1.1. __construct

__construct()

Sets filter options

Parameters:string|array|ZendConfigConfig
Return type:void

724.1.1.2. setDefaultScheme

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.

Parameters:string
Return type:ZendFilterUriNormalize

724.1.1.3. setEnforcedScheme

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.

Parameters:string
Return type:ZendFilterUriNormalize

724.1.1.4. filter

filter()

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

Parameters:string
Return type:string

724.1.1.5. enforceScheme

enforceScheme()

Enforce the defined scheme on the URI

This will also adjust the host and path parts of the URI as expected in the case of scheme-less network URIs

Parameters:Uri

Project Versions

Table Of Contents

Previous topic

723. Class

Next topic

725. Class

This Page