src/HTML.php
protected static function getFilters($set = self::S_MEDIA){

		$tags = self::$_strict_tags;
		$tags_drop = self::$_strict_tags_drop;
		$attributes = self::$_strict_attributes;

		switch($set){

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_MEDIA:

				$tags = array_merge_recursive(
					$tags,
					self::$_media_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_media_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_media_attributes
				);

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_LINK:

				$tags = array_merge_recursive(
					$tags,
					self::$_link_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_link_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_link_attributes
				);

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_BASIC:

				$tags = array_merge_recursive(
					$tags,
					self::$_basic_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_basic_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_basic_attributes
				);
			break;

			case self::S_LIMITED:

				// Limited is a bit special, it only consists of limited and
					// media. Therefore it doesn't need the fallthrough structure

				$tags = array_merge_recursive(
					static::$_limited_tags,
					static::$_media_tags
				);

				$tags_drop = array_merge_recursive(
					static::$_limited_tags_drop,
					static::$_media_tags_drop
				);

				$attributes = array_merge_recursive(
					static::$_limited_attributes,
					static::$_media_attributes
				);

			break;

			default:
			break;
		}

		return [
			'tags' => $tags,
			'tags_drop' => $tags_drop,
			'attributes' => $attributes
		];
	}
protected static function getFilters($set = self::S_MEDIA){

		$tags = self::$_strict_tags;
		$tags_drop = self::$_strict_tags_drop;
		$attributes = self::$_strict_attributes;

		switch($set){

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_MEDIA:

				$tags = array_merge_recursive(
					$tags,
					self::$_media_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_media_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_media_attributes
				);

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_LINK:

				$tags = array_merge_recursive(
					$tags,
					self::$_link_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_link_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_link_attributes
				);

			/** @noinspection PhpMissingBreakStatementInspection */
			case self::S_BASIC:

				$tags = array_merge_recursive(
					$tags,
					self::$_basic_tags
				);

				$tags_drop = array_merge_recursive(
					$tags_drop,
					self::$_basic_tags_drop
				);

				$attributes = array_merge_recursive(
					$attributes,
					self::$_basic_attributes
				);
			break;

			case self::S_LIMITED:

				// Limited is a bit special, it only consists of limited and
					// media. Therefore it doesn't need the fallthrough structure

				$tags = array_merge_recursive(
					static::$_limited_tags,
					static::$_media_tags
				);

				$tags_drop = array_merge_recursive(
					static::$_limited_tags_drop,
					static::$_media_tags_drop
				);

				$attributes = array_merge_recursive(
					static::$_limited_attributes,
					static::$_media_attributes
				);

			break;

			default:
			break;
		}

		return [
			'tags' => $tags,
			'tags_drop' => $tags_drop,
			'attributes' => $attributes
		];
	}
protected static function getFilters ( $ set = self :: S_MEDIA ) { $ tags = self :: $ _strict_tags ; $ tags_drop = self :: $ _strict_tags_drop ; $ attributes = self :: $ _strict_attributes ; switch ( $ set ) { /** @noinspection PhpMissingBreakStatementInspection */ case self :: S_MEDIA : $ tags = array_merge_recursive ( $ tags , self :: $ _media_tags ) ; $ tags_drop = array_merge_recursive ( $ tags_drop , self :: $ _media_tags_drop ) ; $ attributes = array_merge_recursive ( $ attributes , self :: $ _media_attributes ) ; /** @noinspection PhpMissingBreakStatementInspection */ case self :: S_LINK : $ tags = array_merge_recursive ( $ tags , self :: $ _link_tags ) ; $ tags_drop = array_merge_recursive ( $ tags_drop , self :: $ _link_tags_drop ) ; $ attributes = array_merge_recursive ( $ attributes , self :: $ _link_attributes ) ; /** @noinspection PhpMissingBreakStatementInspection */ case self :: S_BASIC : $ tags = array_merge_recursive ( $ tags , self :: $ _basic_tags ) ; $ tags_drop = array_merge_recursive ( $ tags_drop , self :: $ _basic_tags_drop ) ; $ attributes = array_merge_recursive ( $ attributes , self :: $ _basic_attributes ) ; break ; case self :: S_LIMITED : // Limited is a bit special, it only consists of limited and // media. Therefore it doesn't need the fallthrough structure $ tags = array_merge_recursive ( static :: $ _limited_tags , static :: $ _media_tags ) ; $ tags_drop = array_merge_recursive ( static :: $ _limited_tags_drop , static :: $ _media_tags_drop ) ; $ attributes = array_merge_recursive ( static :: $ _limited_attributes , static :: $ _media_attributes ) ; break ; default : break ; } return [ 'tags' => $ tags , 'tags_drop' => $ tags_drop , 'attributes' => $ attributes ] ; }
Get the filters.

<p>Returns an array containing the default filters for the HTML library.
The array consists of three elements:</p>

<ul>
<li><strong>tags:</strong> An array of valid tags that are allowed to
remain inside the filtered HTML.</li>
<li><strong>tags_drop:</strong> An array of tags that should be
explicitly dropped from the output.<li>
<li><strong>attributes:</strong> An array of allowed attributes.</li>
</ul>

@param string $set

@return array
Get the filters .