[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Remote/Response/ -> PageHit.php (source)

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