ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 

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.

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

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

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: