ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
MarkdownFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace 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}
__construct(protected Shape\Markdown $markdown_shape, protected Shape\SimpleDocumentMarkdown $simple_document_markdown_shape, protected Shape\WordOnlyMarkdown $word_only_markdown_shape)
Methods in this interface should mostly be called by the according methods on Text instances,...
Definition: Shape.php:35