package Default
inherited_from \Zend\Filter\AbstractFilter

 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 = null

Parameters

$options

stringarray\Traversable

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

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

Returns

stringmixed

Returns the attributesAllowed option

getAttributesAllowed() : array

Returns

array

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

Returns the tagsAllowed option

getTagsAllowed() : array

Returns

array

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

Sets the attributesAllowed option

setAttributesAllowed(array|string $attributesAllowed) : \Zend\Filter\StripTags
fluent This method is part of a fluent interface and will return the same instance

Parameters

$attributesAllowed

arraystring

Returns

\Zend\Filter\StripTagsProvides a fluent interface

setOptions()

setOptions(array|\Traversable $options) : \Zend\Filter\StripTags
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\StripTags

Sets the tagsAllowed option

setTagsAllowed(array|string $tagsAllowed) : \Zend\Filter\StripTags
fluent This method is part of a fluent interface and will return the same instance

Parameters

$tagsAllowed

arraystring

Returns

\Zend\Filter\StripTagsProvides 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) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

Array of allowed attributes for all allowed tags

$attributesAllowed : array

Default

array()

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

 

Filter options

$options : array

Default

array()
 

Array of allowed tags and allowed attributes for each allowed tag

$tagsAllowed : array

Default

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 = '__Zend_Filter_StripTags__'