ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown Class Reference
+ Inheritance diagram for ILIAS\Data\Text\Shape\SimpleDocumentMarkdown:
+ Collaboration diagram for ILIAS\Data\Text\Shape\SimpleDocumentMarkdown:

Public Member Functions

 getSupportedStructure ()
 
 fromString (string $text)
 
 isRawStringCompliant (string $text)
 
- Public Member Functions inherited from ILIAS\Data\Text\Shape\Markdown
 __construct (Refinery\String\MarkdownFormattingToHTML $markdown_to_html,)
 
 toHTML (Text\Text $text)
 
 toPlainText (Text\Text $text)
 
 getMarkup ()
 
 fromString (string $text)
 
 isRawStringCompliant (string $text)
 
- Public Member Functions inherited from ILIAS\Data\Text\Shape
 toHTML (Text $text)
 It should almost never be required to call this directly on shape. More...
 
 toPlainText (Text $text)
 It should almost never be required to call this directly on shape. More...
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Data\Text\Shape\Markdown
Refinery Transformation $markdown_to_html_transformation
 

Detailed Description

Definition at line 27 of file SimpleDocumentMarkdown.php.

Member Function Documentation

◆ fromString()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::fromString ( string  $text)
Exceptions

Implements ILIAS\Data\Text\Shape.

Definition at line 52 of file SimpleDocumentMarkdown.php.

Referenced by ILIAS\Data\Text\MarkdownFactory\simpleDocument().

52  : Text\SimpleDocumentMarkdown
53  {
54  return new Text\SimpleDocumentMarkdown($this, $text);
55  }
+ Here is the caller graph for this function:

◆ getSupportedStructure()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::getSupportedStructure ( )
Returns
Structure[]

Definition at line 32 of file SimpleDocumentMarkdown.php.

References ILIAS\Data\Text\CODE.

32  : array
33  {
34  return [
35  Structure::BOLD,
36  Structure::ITALIC,
37  Structure::HEADING_1,
38  Structure::HEADING_2,
39  Structure::HEADING_3,
40  Structure::HEADING_4,
41  Structure::HEADING_5,
42  Structure::HEADING_6,
43  Structure::UNORDERED_LIST,
44  Structure::ORDERED_LIST,
45  Structure::PARAGRAPH,
46  Structure::LINK,
47  Structure::BLOCKQUOTE,
49  ];
50  }

◆ isRawStringCompliant()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::isRawStringCompliant ( string  $text)

Implements ILIAS\Data\Text\Shape.

Definition at line 57 of file SimpleDocumentMarkdown.php.

57  : bool
58  {
59  $options = mb_regex_set_options();
60  try {
61  mb_regex_set_options("m");
62  return !mb_ereg_match(
63  '.*((' . MRE::IMAGE->value . ')|(' . MRE::REF->value . ')|(' . MRE::IMAGE_REF_USAGE->value . '))',
64  $text
65  );
66  } finally {
67  mb_regex_set_options($options);
68  }
69  }

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