API Documentation

Filter/StripTags.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Filter  
version
$Id: StripTags.php 24278 2011-07-28 18:32:21Z adamlundrigan $  

\Zend_Filter_StripTags

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

Constants

Constant  UNIQUE_ID_PREFIX = '__Zend_Filter_StripTags__'

Unique ID prefix used for allowing comments

Properties

Propertyprotectedarray  $_attributesAllowed= 'array'

Array of allowed attributes for all allowed tags

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

Default valuearrayDetails
Type
array
Propertyprotectedarray  $_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 valuearrayDetails
Type
array
Propertypublicboolean  $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
Name Type Description
$options string|array|\Zend_Config
methodprotected_filterTag( string $tag ) : string

Filters a single tag against the current option settings

Parameters
Name Type Description
$tag string
Returns
Type Description
string
methodpublicfilter( string $value ) : string

Defined by Zend_Filter_Interface

Parameters
Name Type Description
$value string
Returns
Type Description
string
Throws
Exception Description
\Zend_Filter_Exception If filtering $value is impossible
Details
todo
improve docblock descriptions  
methodpublicgetAttributesAllowed( ) : array

Returns the attributesAllowed option

Returns
Type Description
array
methodpublicgetCommentsAllowed( ) : bool

Returns the commentsAllowed option

This setting is now deprecated and ignored internally.

Returns
Type Description
bool
Details
deprecated
 
methodpublicgetTagsAllowed( ) : array

Returns the tagsAllowed option

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

Sets the attributesAllowed option

Parameters
Name Type Description
$attributesAllowed array|string
Returns
Type Description
\Zend_Filter_StripTags Provides a fluent interface
methodpublicsetCommentsAllowed( boolean $commentsAllowed ) : \Zend_Filter_StripTags

Sets the commentsAllowed option

This setting is now deprecated and ignored internally.

Parameters
Name Type Description
$commentsAllowed boolean
Returns
Type Description
\Zend_Filter_StripTags Provides a fluent interface
Details
deprecated
 
methodpublicsetTagsAllowed( array|string $tagsAllowed ) : \Zend_Filter_StripTags

Sets the tagsAllowed option

Parameters
Name Type Description
$tagsAllowed array|string
Returns
Type Description
\Zend_Filter_StripTags Provides a fluent interface
Documentation was generated by DocBlox 0.13.3.