xref: /dokuwiki/inc/Remote/Response/Link.php (revision 6cce3332fbc12c1e250ec7e6adbad6d4dc2c74e8)
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
16    public function __construct($data)
17    {
18        $this->type = $data['type'] ?? '';
19        $this->page = $data['page'] ?? '';
20        $this->href = $data['href'] ?? '';
21    }
22}
23