| 1 | <?php |
||
| 20 | class Reference |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $label; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $destination; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected $title; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Constructor |
||
| 39 | * |
||
| 40 | * @param string $label |
||
| 41 | * @param string $destination |
||
| 42 | * @param string $title |
||
| 43 | */ |
||
| 44 | 222 | public function __construct($label, $destination, $title) |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 222 | public function getLabel() |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | 189 | public function getDestination() |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | 189 | public function getTitle() |
|
| 74 | |||
| 75 | /** |
||
| 76 | * Normalize reference label |
||
| 77 | * |
||
| 78 | * This enables case-insensitive label matching |
||
| 79 | * |
||
| 80 | * @param string $string |
||
| 81 | * |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 285 | public static function normalizeReference($string) |
|
| 92 | } |
||
| 93 |