1<?php 2 3namespace dokuwiki\Remote\Response; 4 5class Link extends ApiResponse 6{ 7 /** @var string The type of this link: `internal`, `external` or `interwiki` */ 8 public $type; 9 /** @var string The wiki page this link points to, same as `href` for external links */ 10 public $page; 11 /** @var string A hyperlink pointing to the linked target */ 12 public $href; 13 14 /** 15 * @param string $type One of `internal`, `external` or `interwiki` 16 * @param string $page The wiki page this link points to, same as `href` for external links 17 * @param string $href A hyperlink pointing to the linked target 18 */ 19 public function __construct($type, $page, $href) 20 { 21 $this->type = $type; 22 $this->page = $page; 23 $this->href = $href; 24 } 25 26 /** @inheritdoc */ 27 public function __toString() 28 { 29 return $this->href; 30 } 31} 32