ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ILIAS\Data\Text\TextBase Class Reference
+ Inheritance diagram for ILIAS\Data\Text\TextBase:
+ Collaboration diagram for ILIAS\Data\Text\TextBase:

Public Member Functions

 __construct (protected Shape $shape, protected string $raw)
 
 getShape ()
 
 getMarkup ()
 
 getSupportedStructure ()
 
 toHTML ()
 
 toPlainText ()
 
 getRawRepresentation ()
 
 getShape ()
 
 getMarkup ()
 
 getSupportedStructure ()
 
 toHTML ()
 
 toPlainText ()
 
 getRawRepresentation ()
 

Detailed Description

Definition at line 23 of file TextBase.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\Text\TextBase::__construct ( protected Shape  $shape,
protected string  $raw 
)

Definition at line 25 of file TextBase.php.

28 {
29 if (!$shape->isRawStringCompliant($raw)) {
30 throw new \InvalidArgumentException("The provided string is not compliant with the supported structure!");
31 }
32 }

References ILIAS\Data\Text\Shape\isRawStringCompliant().

+ Here is the call graph for this function:

Member Function Documentation

◆ getMarkup()

ILIAS\Data\Text\TextBase::getMarkup ( )

Implements ILIAS\Data\Text\Text.

Definition at line 39 of file TextBase.php.

39 : Markup
40 {
41 return $this->shape->getMarkup();
42 }

◆ getRawRepresentation()

ILIAS\Data\Text\TextBase::getRawRepresentation ( )

Implements ILIAS\Data\Text\Text.

Definition at line 62 of file TextBase.php.

62 : string
63 {
64 return $this->raw;
65 }

◆ getShape()

ILIAS\Data\Text\TextBase::getShape ( )

Implements ILIAS\Data\Text\Text.

Definition at line 34 of file TextBase.php.

34 : Shape
35 {
36 return $this->shape;
37 }

◆ getSupportedStructure()

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

Implements ILIAS\Data\Text\Text.

Reimplemented in ILIAS\Data\Text\Shape\SimpleDocumentMarkdown, and ILIAS\Data\Text\Shape\WordOnlyMarkdown.

Definition at line 47 of file TextBase.php.

47 : array
48 {
49 return $this->shape->getSupportedStructure();
50 }

◆ toHTML()

ILIAS\Data\Text\TextBase::toHTML ( )

Implements ILIAS\Data\Text\Text.

Definition at line 52 of file TextBase.php.

52 : HTML
53 {
54 return $this->shape->toHTML($this);
55 }

◆ toPlainText()

ILIAS\Data\Text\TextBase::toPlainText ( )

Implements ILIAS\Data\Text\Text.

Definition at line 57 of file TextBase.php.

57 : PlainText
58 {
59 return $this->shape->toPlainText($this);
60 }

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