ILIAS  release_7 Revision v7.30-3-g800a261c036
ilHtmlPurifierFactory Class Reference

Factory for creating purifier instances. More...

+ Collaboration diagram for ilHtmlPurifierFactory:

Static Public Member Functions

static _getInstanceByType (string $type)
 Factory method for creating purifier instances. More...
 

Detailed Description

Factory for creating purifier instances.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 8 of file class.ilHtmlPurifierFactory.php.

Member Function Documentation

◆ _getInstanceByType()

static ilHtmlPurifierFactory::_getInstanceByType ( string  $type)
static

Factory method for creating purifier instances.

Parameters
string$typetype for the concrete purifier instance
Returns
ilHtmlPurifierInterface
Exceptions
ilHtmlPurifierNotFoundException

Definition at line 16 of file class.ilHtmlPurifierFactory.php.

17 {
18 global $DIC;
19
20 switch ($type) {
21 case 'frm_post':
22 return new ilHtmlForumPostPurifier();
23 break;
24
25 case 'qpl_usersolution':
27 break;
28 }
29
30 throw new ilHtmlPurifierNotFoundException(sprintf(
31 $DIC->language()->txt('frm_purifier_not_implemented_for_type_x'),
32 $type
33 ));
34 }
Concrete class for sanitizing html of forum posts.
Class for html related exception handling in ILIAS.
global $DIC
Definition: goto.php:24
Interface for html sanitizing functionality.
$type

References $DIC, and $type.

Referenced by ilObjTest\getHtmlQuestionContentPurifier(), assQuestion\getHtmlQuestionContentPurifier(), ilAssQuestionHint\getHtmlQuestionContentPurifier(), assQuestion\getHtmlUserSolutionPurifier(), ilForumXMLParser\handlerEndTag(), and ilForumThreadFormGUI\initForm().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: