Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <colinodell@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
declare(strict_types=1);
13
 
14
namespace League\CommonMark\Output;
15
 
16
use League\CommonMark\Node\Block\Document;
17
 
18
class RenderedContent implements RenderedContentInterface, \Stringable
19
{
20
    /** @psalm-readonly */
21
    private Document $document;
22
 
23
    /** @psalm-readonly */
24
    private string $content;
25
 
26
    public function __construct(Document $document, string $content)
27
    {
28
        $this->document = $document;
29
        $this->content  = $content;
30
    }
31
 
32
    public function getDocument(): Document
33
    {
34
        return $this->document;
35
    }
36
 
37
    public function getContent(): string
38
    {
39
        return $this->content;
40
    }
41
 
42
    /**
43
     * @psalm-mutation-free
44
     */
45
    public function __toString(): string
46
    {
47
        return $this->content;
48
    }
49
}