Function __global->generate_text_summary

Definitions

sources/database_search.php

  • Highlight keywords in an extracted portion of a piece of text.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$_temp_summary string No No required parameter N/A N/A What was searched
$words_searched array No No required parameter N/A N/A List of words searched
&$cnt ?integer Yes No Null N/A N/A Count of matched words (null: pass by reference)

Returns

  • Highlighted portion
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Highlight keywords in an extracted portion of a piece of text.
 *
 * @param  string $_temp_summary What was searched
 * @param  array $words_searched List of words searched
 * @param  ?integer $cnt Count of matched words (null: pass by reference)
 * @return string Highlighted portion
 */

function generate_text_summary(string $_temp_summary, array $words_searched, ?int &$cnt = null) : string