You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
877 B

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