ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWebDAVMountInstructionsHtmlDocumentProcessor Class Reference
+ Inheritance diagram for ilWebDAVMountInstructionsHtmlDocumentProcessor:
+ Collaboration diagram for ilWebDAVMountInstructionsHtmlDocumentProcessor:

Public Member Functions

 __construct (ilHtmlPurifierInterface $a_document_purifier)
 HTML processor constructor. More...
 
 processMountInstructions (string $a_raw_mount_instructions)
 Processes mount instructions written with HTML. More...
 
- Public Member Functions inherited from ilWebDAVMountInstructionsDocumentProcessorBase
 parseInstructionsToAssocArray (string $a_raw_mount_instructions)
 

Protected Attributes

 $document_purifier
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilWebDAVMountInstructionsHtmlDocumentProcessor::__construct ( ilHtmlPurifierInterface  $a_document_purifier)

HTML processor constructor.

Parameters
ilHtmlPurifierInterface$a_document_purifier

Definition at line 13 of file class.ilWebDAVMountInstructionsHtmlDocumentProcessor.php.

14  {
15  $this->document_purifier = $a_document_purifier;
16  }

Member Function Documentation

◆ processMountInstructions()

ilWebDAVMountInstructionsHtmlDocumentProcessor::processMountInstructions ( string  $a_raw_mount_instructions)

Processes mount instructions written with HTML.

Parameters
string$a_raw_mount_instructions
Returns
array

Implements ilWebDAVMountInstructionsDocumentProcessor.

Definition at line 24 of file class.ilWebDAVMountInstructionsHtmlDocumentProcessor.php.

References ilWebDAVMountInstructionsDocumentProcessorBase\parseInstructionsToAssocArray().

24  : 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  }
+ Here is the call graph for this function:

Field Documentation

◆ $document_purifier

ilWebDAVMountInstructionsHtmlDocumentProcessor::$document_purifier
protected

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