16cce3332SAndreas Gohr<?php 26cce3332SAndreas Gohr 36cce3332SAndreas Gohrnamespace dokuwiki\Remote\Response; 46cce3332SAndreas Gohr 56cce3332SAndreas Gohr/** 66cce3332SAndreas Gohr * Represents a page found by a search 76cce3332SAndreas Gohr */ 86cce3332SAndreas Gohrclass PageHit extends Page 96cce3332SAndreas Gohr{ 106cce3332SAndreas Gohr /** @var int The number of hits this result got */ 116cce3332SAndreas Gohr public $score; 126cce3332SAndreas Gohr 136cce3332SAndreas Gohr /** @var string The HTML formatted snippet in which the search term was found (if available) */ 146cce3332SAndreas Gohr public $snippet; 156cce3332SAndreas Gohr 166cce3332SAndreas Gohr /** @var string Not available for search results */ 176cce3332SAndreas Gohr public $hash; 186cce3332SAndreas Gohr 196cce3332SAndreas Gohr /** @var string Not available for search results */ 206cce3332SAndreas Gohr public $author; 216cce3332SAndreas Gohr 22*58ae4747SAndreas Gohr /** 23*58ae4747SAndreas Gohr * PageHit constructor. 24*58ae4747SAndreas Gohr * 25*58ae4747SAndreas Gohr * @param string $id 26*58ae4747SAndreas Gohr * @param string $snippet 27*58ae4747SAndreas Gohr * @param int $score 28*58ae4747SAndreas Gohr * @param string $title 29*58ae4747SAndreas Gohr */ 30*58ae4747SAndreas Gohr public function __construct($id, $snippet = '', $score = 0, $title = '') 316cce3332SAndreas Gohr { 32*58ae4747SAndreas Gohr parent::__construct($id, 0, 0, $title); 336cce3332SAndreas Gohr 34*58ae4747SAndreas Gohr $this->snippet = $snippet; 35*58ae4747SAndreas Gohr $this->score = $score; 366cce3332SAndreas Gohr } 376cce3332SAndreas Gohr} 38