Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
SearchHighlight Class Reference
+ Collaboration diagram for SearchHighlight:

Public Member Functions

 __construct ()
 
 setLimit ($limit)
 
 rawHighLight ($s, $k)
 
 highlight ($s, $k)
 

Static Public Member Functions

static strtr8 ($s, $c1, $c2)
 

Data Fields

 $beginTag = '<b>'
 
 $endTag = '</b>'
 

Detailed Description

Definition at line 22 of file Class.SearchHighlight.php.

Constructor & Destructor Documentation

__construct ( )

Definition at line 34 of file Class.SearchHighlight.php.

+ Here is the call graph for this function:

Member Function Documentation

highlight (   $s,
  $k 
)

return part of text where are found keywords Due to unaccent fulltext vectorisation need to transpose original text with highlight text done by headline tsearch2 sql function

Parameters
string$soriginal text
string$kkeywords
Returns
string HTML text with tags

Definition at line 95 of file Class.SearchHighlight.php.

+ Here is the call graph for this function:

rawHighLight (   $s,
  $k 
)

return part of text where are found keywords use simply regexp replace

Parameters
string$soriginal text
string$kkeywords
Returns
string HTML text with tags

Definition at line 56 of file Class.SearchHighlight.php.

setLimit (   $limit)

Definition at line 39 of file Class.SearchHighlight.php.

static strtr8 (   $s,
  $c1,
  $c2 
)
static

Definition at line 43 of file Class.SearchHighlight.php.

Field Documentation

$beginTag = '<b>'

Definition at line 31 of file Class.SearchHighlight.php.

$endTag = '</b>'

Definition at line 32 of file Class.SearchHighlight.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen