16cce3332SAndreas Gohr<?php 26cce3332SAndreas Gohr 36cce3332SAndreas Gohrnamespace dokuwiki\Remote\Response; 46cce3332SAndreas Gohr 56cce3332SAndreas Gohrclass Link extends ApiResponse 66cce3332SAndreas Gohr{ 76cce3332SAndreas Gohr /** @var string The type of this link: `internal`, `external` or `interwiki` */ 86cce3332SAndreas Gohr public $type; 96cce3332SAndreas Gohr /** @var string The wiki page this link points to, same as `href` for external links */ 106cce3332SAndreas Gohr public $page; 116cce3332SAndreas Gohr /** @var string A hyperlink pointing to the linked target */ 126cce3332SAndreas Gohr public $href; 136cce3332SAndreas Gohr 1458ae4747SAndreas Gohr /** 1558ae4747SAndreas Gohr * @param string $type One of `internal`, `external` or `interwiki` 1658ae4747SAndreas Gohr * @param string $page The wiki page this link points to, same as `href` for external links 1758ae4747SAndreas Gohr * @param string $href A hyperlink pointing to the linked target 1858ae4747SAndreas Gohr */ 1958ae4747SAndreas Gohr public function __construct($type, $page, $href) 206cce3332SAndreas Gohr { 2158ae4747SAndreas Gohr $this->type = $type; 2258ae4747SAndreas Gohr $this->page = $page; 2358ae4747SAndreas Gohr $this->href = $href; 246cce3332SAndreas Gohr } 25*8268b284SAndreas Gohr 26*8268b284SAndreas Gohr /** @inheritdoc */ 27*8268b284SAndreas Gohr public function __toString() 28*8268b284SAndreas Gohr { 29*8268b284SAndreas Gohr return $this->href; 30*8268b284SAndreas Gohr } 316cce3332SAndreas Gohr} 32