Methods

Sets filter options

__construct(array | \Traversable | null $options) 

Parameters

$options

array\Traversablenull

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to filter()

inherited_from \Zend\Filter\AbstractFilter::__invoke()

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

Exceptions

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

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::getOptions()

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport()

Returns

bool

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

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

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

$defaultScheme

string

Returns

\Zend\Filter\self

Set a URI scheme to enforce on schemeless URIs

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

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

$enforcedScheme

string

Returns

\Zend\Filter\self

setOptions()

setOptions(array | \Traversable $options) : \Zend\Filter\self
Inherited

inherited_from \Zend\Filter\AbstractFilter::setOptions()

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\self

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

isOptions()

isOptions(mixed $options) : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::isOptions()

Parameters

$options

mixed

Returns

bool

 Properties

 

The default scheme to use when parsing scheme-less URIs

$defaultScheme : string

 

Enforced scheme for scheme-less URIs.

$enforcedScheme : string

See setEnforcedScheme docs for info

 

Filter options

$options : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::$$options