DBFieldTextHtmlPurified Class Reference
[HtmlPurifier]
A DB Text field holding HTML that automatically gets purified before it is written to DB. More...
Inheritance diagram for
DBFieldTextHtmlPurified:
Public Member Functions |
|
__construct ($name, $length=DBFieldText::BLOB_LENGTH_SMALL, $default_value=null, $policy=self::NONE) | |
Constructor. |
|
Protected Member Functions |
|
apply_conversion ($value) | |
To be overloaded: Apply conversion. |
|
do_format_not_null ($value) | |
Format values that are not NULL. |
Detailed Description
A DB Text field holding HTML that automatically gets purified before it is written to DB.
This class is rather generic. You can overload it to apply more specialized conversion.
- Deprecated:
- It is recommended to use DBFieldTextHtml instead, which is much more flexible.
Definition at line 12 of file dbfield.text.htmlpurified.cls.php.
Constructor & Destructor Documentation
DBFieldTextHtmlPurified::__construct | ( | $ | name, | |
$ | length = DBFieldText::BLOB_LENGTH_SMALL , |
|||
$ | default_value =
null , |
|||
$ | policy =
self::NONE |
|||
) |
Constructor.
Since TEXT is more likely than varchar, default length is TEXT
Reimplemented from DBFieldText.
Definition at line 18 of file dbfield.text.htmlpurified.cls.php.
00018 { 00019 parent::__construct($name, $length, $default_value, $policy); 00020 }
Member Function Documentation
DBFieldTextHtmlPurified::apply_conversion | ( | $ | value | ) | [protected] |
To be overloaded: Apply conversion.
- Parameters:
-
string $value
- Returns:
- string
Definition at line 38 of file dbfield.text.htmlpurified.cls.php.
00038 { 00039 return ConverterFactory::encode($value, CONVERTER_HTMLPURIFIER); 00040 }
DBFieldTextHtmlPurified::do_format_not_null | ( | $ | value | ) | [protected] |
Format values that are not NULL.
- Parameters:
-
mixed $value
- Returns:
- string
Reimplemented from DBField.
Definition at line 28 of file dbfield.text.htmlpurified.cls.php.
00028 { 00029 return parent::format($this->apply_conversion($value)); 00030 }
The documentation for this class was generated from the following file:
- contributions/text.htmlpurifier/model/base/fields/dbfield.text.htmlpurified.cls.php