| 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 |
/**
|
|
|
22 |
* Link from the footnote on the bottom of the document back to the reference
|
|
|
23 |
*/
|
|
|
24 |
final class FootnoteBackref extends AbstractInline implements ReferenceableInterface
|
|
|
25 |
{
|
|
|
26 |
/** @psalm-readonly */
|
|
|
27 |
private ReferenceInterface $reference;
|
|
|
28 |
|
|
|
29 |
public function __construct(ReferenceInterface $reference)
|
|
|
30 |
{
|
|
|
31 |
parent::__construct();
|
|
|
32 |
|
|
|
33 |
$this->reference = $reference;
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public function getReference(): ReferenceInterface
|
|
|
37 |
{
|
|
|
38 |
return $this->reference;
|
|
|
39 |
}
|
|
|
40 |
}
|