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.
 
 
 
 
 

38 lines
834 B

  1. <?php
  2. namespace dokuwiki\Remote\Response;
  3. /**
  4. * Represents a page found by a search
  5. */
  6. class PageHit extends Page
  7. {
  8. /** @var int The number of hits this result got */
  9. public $score;
  10. /** @var string The HTML formatted snippet in which the search term was found (if available) */
  11. public $snippet;
  12. /** @var string Not available for search results */
  13. public $hash;
  14. /** @var string Not available for search results */
  15. public $author;
  16. /**
  17. * PageHit constructor.
  18. *
  19. * @param string $id
  20. * @param string $snippet
  21. * @param int $score
  22. * @param string $title
  23. */
  24. public function __construct($id, $snippet = '', $score = 0, $title = '')
  25. {
  26. parent::__construct($id, 0, 0, $title);
  27. $this->snippet = $snippet;
  28. $this->score = $score;
  29. }
  30. }