xref: /dokuwiki/inc/Remote/Response/Link.php (revision 58ae4747de65e434e2a4f2d10822e363198c89b8)
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
14*58ae4747SAndreas Gohr    /**
15*58ae4747SAndreas Gohr     * @param string $type One of `internal`, `external` or `interwiki`
16*58ae4747SAndreas Gohr     * @param string $page The wiki page this link points to, same as `href` for external links
17*58ae4747SAndreas Gohr     * @param string $href A hyperlink pointing to the linked target
18*58ae4747SAndreas Gohr     */
19*58ae4747SAndreas Gohr    public function __construct($type, $page, $href)
206cce3332SAndreas Gohr    {
21*58ae4747SAndreas Gohr        $this->type = $type;
22*58ae4747SAndreas Gohr        $this->page = $page;
23*58ae4747SAndreas Gohr        $this->href = $href;
246cce3332SAndreas Gohr    }
256cce3332SAndreas Gohr}
26