Methods

Sets the filter options Allowed options are 'allowTags' => Tags which are allowed 'allowAttribs' => Attributes which are allowed 'allowComments' => Are comments allowed ?

__construct(string | array | \Traversable $options) 

Parameters

$options

stringarray\Traversable

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

Defined by Zend\Filter\FilterInterface

filter(string $value) : string | mixed

If the value provided is non-scalar, the value will remain unfiltered

todo improve docblock descriptions

Parameters

$value

string

Exceptions

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

Returns

stringmixed

Returns the attributesAllowed option

getAttributesAllowed() : array

Returns

array

Retrieve options representing object state

getOptions() : array
Inherited

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

Returns

array

Returns the tagsAllowed option

getTagsAllowed() : array

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

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

Returns

bool

Sets the attributesAllowed option

setAttributesAllowed(array | string $attributesAllowed) : \Zend\Filter\self

Parameters

$attributesAllowed

arraystring

Returns

\Zend\Filter\selfProvides a fluent interface

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

Sets the tagsAllowed option

setTagsAllowed(array | string $tagsAllowed) : \Zend\Filter\self

Parameters

$tagsAllowed

arraystring

Returns

\Zend\Filter\selfProvides a fluent interface

Filters a single tag against the current option settings

_filterTag(string $tag) : string

Parameters

$tag

string

Returns

string

isOptions()

isOptions(mixed $options) : bool
Inherited

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

Parameters

$options

mixed

Returns

bool

 Properties

 

Array of allowed attributes for all allowed tags

$attributesAllowed : array

Attributes stored here are allowed for all of the allowed tags.

 

Filter options

$options : array
Inherited

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

Array of allowed tags and allowed attributes for each allowed tag

$tagsAllowed : array

Tags are stored in the array keys, and the array values are themselves arrays of the attributes allowed for the corresponding tag.

 Constants

 

Unique ID prefix used for allowing comments

UNIQUE_ID_PREFIX