ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilHtmlPurifierFactory.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
23 public static function _getInstanceByType($a_type)
24 {
25 global $lng;
26
27 switch($a_type)
28 {
29 case 'frm_post':
30 require_once 'Services/Html/classes/class.ilHtmlForumPostPurifier.php';
31 return new ilHtmlForumPostPurifier();
32 break;
33
34 case 'qpl_usersolution':
35 require_once 'Modules/TestQuestionPool/classes/class.ilAssHtmlUserSolutionPurifier.php';
37 break;
38 }
39
40 require_once 'Services/Html/exceptions/class.ilHtmlPurifierNotFoundException.php';
41 throw new ilHtmlPurifierNotFoundException(sprintf($lng->txt('frm_purifier_not_implemented_for_type_x'), $a_type));
42 }
43}
44?>
sprintf('%.4f', $callTime)
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($a_type)
Factory method for creating purifier instances.
Class for html related exception handling in ILIAS.
global $lng
Definition: privfeed.php:17
$a_type
Definition: workflow.php:93