Filter/StripTags.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id: StripTags.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Filter_StripTags

Package: Zend\Filter
Implements
\Zend_Filter_Interface
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  UNIQUE_ID_PREFIX = '__Zend_Filter_StripTags__'
Unique ID prefix used for allowing comments

Properties

>VPropertyprotectedarray $_attributesAllowed = array()
Array of allowed attributes for all allowed tags

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

Default valuearray()Details
Type
array
>VPropertyprotectedarray $_tagsAllowed = array()
Array of allowed tags and allowed attributes for each allowed tag

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

Default valuearray()Details
Type
array
>VPropertypublicboolean $commentsAllowed = false
Whether comments are allowed

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

This setting is now deprecated, and ignored internally.

Default valuefalseDetails
Type
boolean
Deprecated
 

Methods

methodpublic__construct(string | array | \Zend_Config $options = null) : void

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

Parameters
NameTypeDescription
$optionsstring | array | \Zend_Config
methodprotected_filterTag(string $tag) : string

Filters a single tag against the current option settings

Parameters
NameTypeDescription
$tagstring
Returns
TypeDescription
string
methodpublicfilter(string $value) : string

Defined by Zend_Filter_Interface

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Filter_ExceptionIf filtering $value is impossible
Details
Todo
improve docblock descriptions  
methodpublicgetAttributesAllowed() : array

Returns the attributesAllowed option

Returns
TypeDescription
array
methodpublicgetCommentsAllowed() : bool

Returns the commentsAllowed option

This setting is now deprecated and ignored internally.

Returns
TypeDescription
bool
Details
Deprecated
 
methodpublicgetTagsAllowed() : array

Returns the tagsAllowed option

Returns
TypeDescription
array
methodpublicsetAttributesAllowed(array | string $attributesAllowed) : \Zend_Filter_StripTags

Sets the attributesAllowed option

Parameters
NameTypeDescription
$attributesAllowedarray | string
Returns
TypeDescription
\Zend_Filter_StripTagsProvides a fluent interface
methodpublicsetCommentsAllowed(boolean $commentsAllowed) : \Zend_Filter_StripTags

Sets the commentsAllowed option

This setting is now deprecated and ignored internally.

Parameters
NameTypeDescription
$commentsAllowedboolean
Returns
TypeDescription
\Zend_Filter_StripTagsProvides a fluent interface
Details
Deprecated
 
methodpublicsetTagsAllowed(array | string $tagsAllowed) : \Zend_Filter_StripTags

Sets the tagsAllowed option

Parameters
NameTypeDescription
$tagsAllowedarray | string
Returns
TypeDescription
\Zend_Filter_StripTagsProvides a fluent interface
Documentation was generated by phpDocumentor 2.0.0a12.