ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilWebDAVMountInstructionsHtmlDocumentProcessor.php
Go to the documentation of this file.
1<?php
2
3
5{
8
13 public function __construct(ilHtmlPurifierInterface $a_document_purifier)
14 {
15 $this->document_purifier = $a_document_purifier;
16 }
17
24 public function processMountInstructions(string $a_raw_mount_instructions) : array
25 {
26 $purified_html_content = $this->document_purifier->purify($a_raw_mount_instructions);
27
28 $html_validator = new ilWebDAVMountInstructionsDocumentsContainsHtmlValidator($purified_html_content);
29 if (!$html_validator->isValid()) {
30 $purified_html_content = nl2br($purified_html_content);
31 }
32
33 return $this->parseInstructionsToAssocArray($purified_html_content);
34 }
35}
An exception for terminatinating execution or to throw for unit testing.
processMountInstructions(string $a_raw_mount_instructions)
Processes mount instructions written with HTML.
__construct(ilHtmlPurifierInterface $a_document_purifier)
HTML processor constructor.
Interface for html sanitizing functionality.