ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilHtmlPurifierFactory.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
16 public static function _getInstanceByType(string $type) : ilHtmlPurifierInterface
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 }
35}
An exception for terminatinating execution or to throw for unit testing.
Concrete class for sanitizing html of forum posts.
Factory for creating purifier instances.
static _getInstanceByType(string $type)
Factory method for creating purifier instances.
Class for html related exception handling in ILIAS.
Interface for html sanitizing functionality.
$type
$DIC
Definition: xapitoken.php:46