| 1 | <?php |
||
| 11 | class Link implements Item, Activatable, HasHtmlAttributes, HasParentAttributes, HasUrl |
||
| 12 | { |
||
| 13 | use ActivatableTrait, HasUrlTrait, HtmlAttributes, ParentAttributes; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | protected $text; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | protected $url; |
||
| 20 | |||
| 21 | /** @var array */ |
||
| 22 | protected $prefixes = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $url |
||
| 26 | * @param string $text |
||
| 27 | */ |
||
| 28 | protected function __construct(string $url, string $text) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $url |
||
| 40 | * @param string $text |
||
| 41 | * |
||
| 42 | * @return static |
||
| 43 | */ |
||
| 44 | public static function to(string $url, string $text) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getText(): string |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function render(): string |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function __toString(): string |
||
| 76 | } |
||
| 77 |