ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
MarkdownFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Data\Text;
22 
24 {
25  public function __construct(
26  protected Shape\Markdown $markdown_shape,
27  protected Shape\SimpleDocumentMarkdown $simple_document_markdown_shape,
28  protected Shape\WordOnlyMarkdown $word_only_markdown_shape
29  ) {
30  }
31 
32  public function generic(string $markdown): Markdown
33  {
34  return $this->markdown_shape->fromString($markdown);
35  }
36 
37  public function simpleDocument(string $markdown): SimpleDocumentMarkdown
38  {
39  return $this->simple_document_markdown_shape->fromString($markdown);
40  }
41 
42  public function wordOnly(string $markdown): WordOnlyMarkdown
43  {
44  return $this->word_only_markdown_shape->fromString($markdown);
45  }
46 }
Methods in this interface should mostly be called by the according methods on Text instances...
Definition: Shape.php:34
__construct(protected Shape\Markdown $markdown_shape, protected Shape\SimpleDocumentMarkdown $simple_document_markdown_shape, protected Shape\WordOnlyMarkdown $word_only_markdown_shape)