ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 26 of file TextBase.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 28 of file TextBase.php.

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

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 42 of file TextBase.php.

42 : Markup
43 {
44 return $this->shape->getMarkup();
45 }

◆ getRawRepresentation()

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

Implements ILIAS\Data\Text\Text.

Definition at line 65 of file TextBase.php.

65 : string
66 {
67 return $this->raw;
68 }

◆ getShape()

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

Implements ILIAS\Data\Text\Text.

Definition at line 37 of file TextBase.php.

37 : Shape
38 {
39 return $this->shape;
40 }

◆ 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 50 of file TextBase.php.

50 : array
51 {
52 return $this->shape->getSupportedStructure();
53 }

◆ toHTML()

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

Implements ILIAS\Data\Text\Text.

Definition at line 55 of file TextBase.php.

55 : Text\HTML
56 {
57 return $this->shape->toHTML($this);
58 }

◆ toPlainText()

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

Implements ILIAS\Data\Text\Text.

Definition at line 60 of file TextBase.php.

60 : Text\PlainText
61 {
62 return $this->shape->toPlainText($this);
63 }

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