category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 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|\Zend_Config $options = null) : void

Parameters

$options

stringarray\Zend_Config

Defined by Zend_Filter_Interface

filter(string $value) : string
todo improve docblock descriptions
inherited_from \Zend_Filter_Interface::filter()

Parameters

$value

string

Returns

string

Returns the attributesAllowed option

getAttributesAllowed() : array

Returns

array

Returns the commentsAllowed option

getCommentsAllowed() : boolean

This setting is now deprecated and ignored internally.

deprecated

Returns

boolean

Returns the tagsAllowed option

getTagsAllowed() : array

Returns

array

Sets the attributesAllowed option

setAttributesAllowed(array|string $attributesAllowed) : \Zend_Filter_StripTags

Parameters

$attributesAllowed

arraystring

Returns

\Zend_Filter_StripTagsProvides a fluent interface

Sets the commentsAllowed option

setCommentsAllowed(boolean $commentsAllowed) : \Zend_Filter_StripTags

This setting is now deprecated and ignored internally.

deprecated

Parameters

$commentsAllowed

boolean

Returns

\Zend_Filter_StripTagsProvides a fluent interface

Sets the tagsAllowed option

setTagsAllowed(array|string $tagsAllowed) : \Zend_Filter_StripTags

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

 Properties

 

Whether comments are allowed

$commentsAllowed : boolean

Default

false

If false (the default), then comments are removed from the input string.

This setting is now deprecated, and ignored internally.

deprecated
 

Array of allowed attributes for all allowed tags

$_attributesAllowed : array

Default

array()

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

 

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__'