package Default
inherited_from \Zend\Filter\AbstractFilter

 Methods

Sets filter options

__construct(array|\Traversable|null $options = null

Parameters

$options

array\Traversablenull

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to \filter()

Parameters

$value

mixed

Exceptions

\Zend\Filter\Exception\ExceptionInterface If filtering $value is impossible

Returns

mixed

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

filter(string $value) : string

Parameters

$value

string

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

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

setDefaultScheme(string $defaultScheme) : \Zend\Filter\UriNormalize

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

fluent This method is part of a fluent interface and will return the same instance

Parameters

$defaultScheme

string

Returns

\Zend\Filter\UriNormalize

Set a URI scheme to enforce on schemeless URIs

setEnforcedScheme(string $enforcedScheme) : \Zend\Filter\UriNormalize

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.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$enforcedScheme

string

Returns

\Zend\Filter\UriNormalize

setOptions()

setOptions(array|\Traversable $options) : \Zend\Filter\UriNormalize
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\UriNormalize

Enforce the defined scheme on the URI

enforceScheme(\Zend\Uri\Uri $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

\Zend\Uri\Uri

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

The default scheme to use when parsing scheme-less URIs

$defaultScheme : string

Default

null
 

Enforced scheme for scheme-less URIs. See setEnforcedScheme docs for info

$enforcedScheme : string

Default

null
 

Filter options

$options : array

Default

array()