Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen 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
 * (c) Rezo Zero / Ambroise Maupate
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
 
13
declare(strict_types=1);
14
 
15
namespace League\CommonMark\Extension\Footnote\Node;
16
 
17
use League\CommonMark\Node\Inline\AbstractInline;
18
use League\CommonMark\Reference\ReferenceInterface;
19
use League\CommonMark\Reference\ReferenceableInterface;
20
 
21
final class FootnoteRef extends AbstractInline implements ReferenceableInterface
22
{
23
    private ReferenceInterface $reference;
24
 
25
    /** @psalm-readonly */
26
    private ?string $content = null;
27
 
28
    /**
29
     * @param array<mixed> $data
30
     */
31
    public function __construct(ReferenceInterface $reference, ?string $content = null, array $data = [])
32
    {
33
        parent::__construct();
34
 
35
        $this->reference = $reference;
36
        $this->content   = $content;
37
 
38
        $this->data->import($data);
39
    }
40
 
41
    public function getReference(): ReferenceInterface
42
    {
43
        return $this->reference;
44
    }
45
 
46
    public function setReference(ReferenceInterface $reference): void
47
    {
48
        $this->reference = $reference;
49
    }
50
 
51
    public function getContent(): ?string
52
    {
53
        return $this->content;
54
    }
55
}