Files
apimacro/vendor/league/commonmark/src/Reference/Reference.php

55 lines
1.1 KiB
PHP
Raw Normal View History

2024-05-07 12:17:25 +02:00
<?php
2024-08-13 13:44:16 +00:00
declare(strict_types=1);
2024-05-07 12:17:25 +02:00
/*
* This file is part of the league/commonmark package.
*
* (c) Colin O'Dell <colinodell@gmail.com>
*
* Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
* - (c) John MacFarlane
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\CommonMark\Reference;
2024-08-13 13:44:16 +00:00
/**
* @psalm-immutable
*/
2024-05-07 12:17:25 +02:00
final class Reference implements ReferenceInterface
{
2024-08-13 13:44:16 +00:00
/** @psalm-readonly */
private string $label;
2024-05-07 12:17:25 +02:00
2024-08-13 13:44:16 +00:00
/** @psalm-readonly */
private string $destination;
2024-05-07 12:17:25 +02:00
2024-08-13 13:44:16 +00:00
/** @psalm-readonly */
private string $title;
2024-05-07 12:17:25 +02:00
public function __construct(string $label, string $destination, string $title)
{
2024-08-13 13:44:16 +00:00
$this->label = $label;
2024-05-07 12:17:25 +02:00
$this->destination = $destination;
2024-08-13 13:44:16 +00:00
$this->title = $title;
2024-05-07 12:17:25 +02:00
}
public function getLabel(): string
{
return $this->label;
}
public function getDestination(): string
{
return $this->destination;
}
public function getTitle(): string
{
return $this->title;
}
}